/* Portale parodia di jethr.uk: dashboard ispirata all'app Jet HR.
   Nessun dato viene raccolto o inviato. */

@font-face {
  font-family: "Mona Sans";
  src: url("../fonts/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --ink: #11150a;
  --ink-soft: #585b54;
  --ink-mute: #8d9185;
  --lime: #dfeb57;
  --lime-soft: #eff4b4;
  --bg: #f4f5f2;
  --card: #ffffff;
  --line: #e6e8e3;
  --ok: #2f8a4c;
  --font: "Mona Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font-family: inherit; }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.disclaimer { background: var(--ink); color: var(--lime); font-weight: 600; font-size: 13px; text-align: center; padding: 8px 16px; }
.disclaimer a { color: #fff; }

.logo { height: 31px; width: auto; display: block; color: var(--ink); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: calc(100vh - 34px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: calc(100vh - 34px); overflow-y: auto; }
.side .logo { margin: 4px 8px 18px; height: 28px; }
.side-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); font-weight: 700; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 14.5px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--lime); color: var(--ink); font-weight: 700; }
.nav-item.locked { color: #b3b6ad; }
.nav-item.locked .lock { margin-left: auto; width: 14px; height: 14px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 8px; padding: 9px 12px; color: var(--ink-mute); font-size: 14px; }
.company { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.logout { text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; display: flex; gap: 6px; align-items: center; color: var(--ink-soft); }

.content { padding: 28px; max-width: 1180px; width: 100%; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.page-h p { margin: 4px 0 0; color: var(--ink-soft); }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1.4fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card h2 { font-size: 17px; margin: 0 0 14px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card .muted { color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; background: var(--bg); color: var(--ink-soft); white-space: nowrap; }
.pill.lime { background: var(--lime); color: var(--ink); }
.pill.ok { background: #e3f2e7; color: var(--ok); }

/* scheda candidato */
.hire { display: flex; gap: 18px; align-items: center; }
.hire img { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; }
.hire .name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 2px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.steps .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
.steps li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.steps li.now .dot { border-color: var(--ink); background: var(--lime); }
.steps .dot svg { width: 14px; height: 14px; stroke-width: 2.6; }
.steps .when { margin-left: auto; color: var(--ink-mute); font-size: 13.5px; }

.tile { display: block; text-decoration: none; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.tile .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--lime-soft); display: grid; place-items: center; margin-bottom: 14px; }
.tile .t { font-weight: 700; font-size: 15.5px; }
.tile .d { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }

/* profilo */
.profile-head { display: flex; gap: 22px; align-items: center; }
.profile-head img { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; }
.profile-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.profile-head .claim { margin: 6px 0 0; font-size: 17px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); }
.timeline .when { font-size: 13px; color: var(--ink-mute); font-weight: 600; }
.timeline .what { font-weight: 800; margin: 2px 0 4px; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* documenti */
.doc { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.doc:first-of-type { border-top: 0; }
.doc .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; }
.doc .t { font-weight: 700; }
.doc .d { color: var(--ink-mute); font-size: 13.5px; }
.doc .pill { margin-left: auto; }
.letter p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; }

/* ---------- progetti: flusso, tab, modulo lead, modulo team ---------- */
@property --s { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cellIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes travel { from { left: -6%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { left: 100%; opacity: 0; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(223,235,87,0); } 50% { box-shadow: 0 0 0 6px rgba(223,235,87,.55); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.flow { display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 18px; overflow: hidden; }
.flow-src { display: flex; flex-direction: column; gap: 6px; }
.flow-node { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 7px 11px; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; color: var(--ink); flex: 0 0 auto; }
.flow-node svg.i { width: 16px; height: 16px; }
.flow-node:hover { border-color: var(--ink); }
.flow-node.hot { background: var(--ink); color: var(--lime); border-color: var(--ink); animation: pulse 2.4s ease-in-out infinite; }
.flow-link { position: relative; flex: 1 1 24px; min-width: 18px; height: 2px; background: var(--line); margin: 0 4px; }
.flow-link i { position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: travel 2.4s linear infinite; }
.flow-link i:nth-child(2) { animation-delay: .8s; background: #9aa82a; }
.flow-link i:nth-child(3) { animation-delay: 1.6s; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { position: relative; border: 0; background: none; padding: 10px 14px 12px; font-weight: 700; font-size: 15px; color: var(--ink-mute); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tab .n { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); color: var(--ink-soft); display: grid; place-items: center; font-size: 12px; }
.tab.on { color: var(--ink); }
.tab.on .n { background: var(--ink); color: var(--lime); }
.tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--ink); transform: scaleX(0); transition: transform .25s ease; }
.tab.on::after { transform: scaleX(1); }
.badge { background: var(--lime); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.badge.bump { animation: bump .45s ease; }
.panel { animation: rowIn .35s ease both; }

/* scansione */
.scan { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.scan-bar { position: relative; flex: 0 0 160px; height: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; }
.scan-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--ink); border-radius: 8px; transition: width .3s ease; }
.scan.run .scan-bar i { width: 40%; background: linear-gradient(90deg, transparent, var(--ink), transparent); animation: shimmer 1s linear infinite; }
.scan.done .scan-bar i { width: 100%; background: var(--lime); }
.scan #scan-txt { flex: 1; min-width: 200px; }
.btn-ghost-sm, .btn-dark-sm { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 13.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); white-space: nowrap; }
.btn-dark-sm { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ghost-sm:hover { border-color: var(--ink); }
.loading .kpis, .loading .lead-grid { opacity: .45; filter: saturate(.4); transition: opacity .3s ease; }

.kpis { margin-bottom: 18px; }
.kpi span { display: block; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }
.kpi b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; color: var(--ink-mute); font-size: 12.5px; }
.kpi.lime { background: var(--lime); border-color: var(--lime); }
.kpi.lime span, .kpi.lime em { color: var(--ink); }

.lead-grid { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.cluster-body { display: grid; grid-template-columns: minmax(380px, 1.2fr) 1fr; gap: 32px; align-items: start; }
.cluster-body .sub-h { margin-top: 0; }
.hint { color: var(--ink-mute); font-size: 13px; margin: -8px 0 12px; }
.sub-h { font-size: 14px; margin: 22px 0 10px; }

/* matrice settore x dimensione */
.matrix { display: grid; gap: 4px; max-width: 520px; }
.mx-row { display: grid; grid-template-columns: 1fr repeat(4, 52px); gap: 4px; align-items: center; }
.mx-head { margin-bottom: 2px; }
.mx-lab, .mx-col { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); text-align: left; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.mx-col { text-align: center; font-size: 11.5px; }
.mx-lab:hover, .mx-col:hover { background: var(--bg); color: var(--ink); }
.mx-lab.sel, .mx-col.sel { background: var(--ink); color: var(--lime); }
.mx-cell { height: 40px; border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 800; font-size: 14px; color: var(--ink); background: rgba(223,235,87, var(--a)); animation: cellIn .35s cubic-bezier(.3,1.4,.5,1) both; animation-delay: var(--d); transition: transform .15s ease, box-shadow .15s ease; }
.mx-cell:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(17,21,10,.15); }
.mx-cell.zero { background: var(--bg); color: #c4c7bf; }
.mx-cell.sel { background: var(--ink); color: var(--lime); }

.chip-g { margin-bottom: 12px; }
.chip-g > span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-weight: 600; font-size: 13px; margin: 0 4px 6px 0; cursor: pointer; color: var(--ink); transition: background .15s ease; }
.chip em { font-style: normal; color: var(--ink-mute); font-weight: 700; margin-left: 2px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on em { color: var(--lime); }

/* lista lead */
.list-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.list-h h2 { margin: 0; }
.list-tools { display: flex; gap: 8px; align-items: center; }
.find { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink-mute); }
.find input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 190px; background: transparent; color: var(--ink); }
.active-f { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.af { border: 0; background: var(--lime-soft); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.af.all { background: var(--bg); }

.lead { border-top: 1px solid var(--line); animation: rowIn .4s ease both; animation-delay: calc(var(--i) * 35ms); transition: transform .45s cubic-bezier(.5,0,.75,0), opacity .45s ease, max-height .45s ease .1s; max-height: 400px; overflow: hidden; }
.lead.leaving { transform: translateX(60%) scale(.9); opacity: 0; max-height: 0; transition-delay: calc(var(--k, 0) * 60ms); }
.lead-main { display: grid; grid-template-columns: 52px 1fr 230px auto; gap: 14px; align-items: center; padding: 14px 4px; cursor: pointer; }
.lead-main:hover { background: #fbfcf8; }
.score { --s: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ink) calc(var(--s) * 1%), var(--line) 0); transition: --s 1s cubic-bezier(.3,.7,.3,1); }
.score span { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; }
.lead-info .t { font-weight: 800; font-size: 15px; }
.lead-info .d { color: var(--ink-mute); font-size: 13px; }
.heat { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 8px; vertical-align: 2px; margin-left: 4px; }
.h-calda { background: var(--lime); }
.h-tiepida { background: #fdecdf; color: #b4541a; }
.h-fredda { background: #e8eef5; color: #3f6b95; }
.sigs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sig { font-size: 11.5px; font-weight: 700; background: var(--bg); border-radius: 6px; padding: 2px 7px; color: var(--ink-soft); }
.sig.ghost { background: none; border: 1px dashed var(--line); }
.people { display: grid; gap: 6px; }
.pp { display: flex; gap: 8px; align-items: center; font-size: 13px; line-height: 1.25; }
.pp svg { width: 16px; height: 16px; color: var(--ink-mute); }
.pp b { display: block; font-size: 13.5px; }
.pp span { color: var(--ink-mute); font-size: 12px; }
.assign { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: #fff; border-radius: 999px; padding: 5px 12px 5px 5px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s ease; }
.assign:hover { background: var(--lime); }
.assign svg { width: 14px; height: 14px; }
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 800; flex: 0 0 auto; }
.av.big { width: 44px; height: 44px; font-size: 15px; }
.lead-more { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.lead.open .lead-more { max-height: 200px; }
.opener { display: flex; gap: 10px; margin: 0 4px 14px 70px; background: var(--lime-soft); border-radius: 10px; padding: 12px 14px; }
.opener p { margin: 2px 0 0; font-size: 14px; }
.more { display: block; margin: 12px auto 0; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.empty { padding: 30px 0; text-align: center; color: var(--ink-mute); }

/* team */
.team-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.seg-g { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-g .seg { border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 700; background: none; cursor: pointer; }
.seg-g .seg.on { background: var(--ink); color: #fff; }
.sort { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.sort select { font: inherit; font-weight: 700; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; color: var(--ink); }

.funnel .f-row { display: grid; grid-template-columns: 120px 1fr 64px 44px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; }
.f-bar { height: 22px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.f-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 6px; transition: width .9s cubic-bezier(.3,.7,.3,1); transition-delay: var(--d); }
.f-row:nth-child(n+4) .f-bar i { background: #9aa82a; }
.f-row:nth-child(5) .f-bar i { background: var(--lime); }
.funnel.in .f-bar i { width: var(--w); }
.f-row b { text-align: right; font-variant-numeric: tabular-nums; }
.f-row em { font-style: normal; color: var(--ink-mute); font-size: 12.5px; }
.f-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; display: flex; justify-content: space-between; font-weight: 600; color: var(--ink-soft); }
.f-foot b { color: var(--ink); font-size: 18px; }

.coach { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); animation: rowIn .4s ease both; animation-delay: calc(var(--i) * 90ms); }
.coach:first-child { border-top: 0; padding-top: 0; }
.coach .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--lime-soft); display: grid; place-items: center; flex: 0 0 auto; }
.coach p { margin: 2px 0 0; color: var(--ink-soft); font-size: 14px; }

.bdr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.bdr { opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .4s ease, box-shadow .2s ease; transition-delay: calc(var(--i) * 60ms); }
.bdr-grid.in .bdr { opacity: 1; transform: none; }
.bdr:hover { box-shadow: 0 14px 30px rgba(17,21,10,.08); }
.bdr-h { display: flex; gap: 12px; align-items: center; }
.who { flex: 1; min-width: 0; }
.who .t { font-weight: 800; }
.who .d { color: var(--ink-mute); font-size: 12.5px; line-height: 1.3; }
.ring { position: relative; width: 56px; height: 56px; flex: 0 0 auto; }
.ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--bg); stroke-width: 7; }
.ring .fg { stroke: var(--ink); stroke-linecap: round; stroke-dashoffset: var(--full); transition: stroke-dashoffset 1.1s cubic-bezier(.3,.7,.3,1) .2s; }
.bdr-grid.in .ring .fg { stroke-dashoffset: var(--off); }
.ring span { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; }
.bdr-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 12px; }
.bdr-kpi b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bdr-kpi span { color: var(--ink-mute); font-size: 11.5px; line-height: 1.2; display: block; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 40px; padding: 0 2px; }
.spark i { flex: 1; height: 0; background: var(--lime); border-radius: 4px 4px 2px 2px; transition: height .7s cubic-bezier(.3,1.3,.5,1); transition-delay: var(--d); }
.bdr-grid.in .spark i { height: var(--h); }
.bdr-f { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.st-top { background: var(--lime); color: var(--ink); }
.st-ok { background: #e3f2e7; color: var(--ok); }
.st-warn { background: #fdecdf; color: #b4541a; }
.q { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); }
.q svg { width: 14px; height: 14px; }
.q.has { color: var(--ink); }
.bdr-note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 10px; }

@media (max-width: 1200px) {
  .cluster-body { grid-template-columns: 1fr; }
  .lead-main { grid-template-columns: 52px 1fr auto; }
  .people { grid-column: 2 / -1; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .lead-main { grid-template-columns: 46px 1fr; }
  .people { grid-template-columns: 1fr; }
  .assign { grid-column: 1 / -1; justify-self: start; }
  .opener { margin-left: 4px; }
  .find input { width: 120px; }
  .funnel .f-row { grid-template-columns: 96px 1fr 52px; }
  .funnel .f-row em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* flusso in verticale quando la riga non ci sta */
@keyframes travelDown { from { top: -6%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: 100%; opacity: 0; } }
@media (max-width: 1240px) {
  .flow { flex-direction: column; align-items: stretch; padding: 14px; }
  .flow-src { flex-direction: row; gap: 6px; }
  .flow-src .flow-node { flex: 1; }
  .flow-node { justify-content: center; }
  .flow-link { flex: 0 0 18px; width: 2px; height: 18px; min-width: 0; margin: 2px auto; }
  .flow-link i { left: -3px; top: 0; animation-name: travelDown; }
}

/* ---------- progetti: modulo 3, ascolto conversazioni ---------- */
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes rec { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* colori delle motivazioni */
.k-tempo { --kc: #2f6fa8; --kb: #e3eef8; }
.k-errori { --kc: #b4281e; --kb: #fbe4e1; }
.k-costo { --kc: #8a6a00; --kb: #fbf0c8; }
.k-crescita { --kc: #2f8a4c; --kb: #e3f2e7; }
.k-controllo { --kc: #6a4bb0; --kb: #ece6f8; }
.k-consulente { --kc: #0f7f80; --kb: #dff3f2; }
.bg-tempo { background: #2f6fa8 !important; } .bg-errori { background: #b4281e !important; } .bg-costo { background: #c9a227 !important; }
.bg-crescita { background: #2f8a4c !important; } .bg-controllo { background: #6a4bb0 !important; } .bg-consulente { background: #0f7f80 !important; }
.t-tempo { color: #2f6fa8; } .t-errori { color: #b4281e; } .t-costo { color: #8a6a00; } .t-crescita { color: #2f8a4c; } .t-controllo { color: #6a4bb0; } .t-consulente { color: #0f7f80; }
.dotc { width: 10px; height: 10px; border-radius: 50%; background: var(--kc); flex: 0 0 auto; }

.asc-top { margin-bottom: 18px; }
.mix .mx-bar { display: grid; grid-template-columns: 12px 130px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.mix .bar { height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.mix .bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .9s cubic-bezier(.3,.7,.3,1); transition-delay: var(--d); }
.mix.in .bar i { width: var(--w); }
.mix .mx-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.insight { margin-top: 14px; background: var(--lime-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.insight b:first-child { font-size: 18px; margin-right: 4px; }

.script h2 .pill { margin-left: auto; }
.sc-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; transition: opacity .3s ease, transform .3s ease, background .3s ease; }
.sc-box span, .sc-prop > span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.sc-box p { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.sc-box.swap { opacity: 0; transform: translateY(-6px); }
.sc-box.v2 { background: var(--lime); }
.sc-box.v2 span { color: var(--ink); }
.sc-prop { margin: 14px 0; }
.sc-prop em { font-style: normal; background: var(--ink); color: var(--lime); border-radius: 999px; padding: 0 7px; margin-left: 4px; display: inline-block; }
.sc-prop em.bump { animation: bump .45s ease; }
.sc-prop ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-soft); }
.sc-prop li { margin-bottom: 4px; }
.sc-prop li.new { animation: slideIn .4s ease both; color: var(--ink); font-weight: 600; }
button:disabled { opacity: .7; cursor: default; }

.conv-wrap { padding: 0; overflow: hidden; }
.conv-grid { display: grid; grid-template-columns: 280px 1fr 360px; min-height: 520px; }
.conv-list { border-right: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 4px; background: #fbfbf9; }
.conv-item { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; background: none; border-radius: 10px; padding: 10px; cursor: pointer; font: inherit; color: var(--ink); animation: rowIn .35s ease both; animation-delay: calc(var(--i) * 50ms); }
.conv-item:hover { background: #fff; border-color: var(--line); }
.conv-item.on { background: #fff; border-color: var(--ink); box-shadow: 0 6px 16px rgba(17,21,10,.06); }
.conv-item.special { background: var(--lime-soft); }
.conv-item.special.on { background: #fff; }
.conv-item .ch { width: 32px; height: 32px; border-radius: 9px; background: var(--bg); display: grid; place-items: center; flex: 0 0 auto; }
.conv-item .ci { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.conv-item .ci b { font-size: 14px; }
.conv-item .ci span { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .ci em { font-style: normal; font-size: 11.5px; color: var(--ink-mute); }
.conv-item .pill { font-size: 10.5px; padding: 2px 8px; }
.done-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.done-mark svg { width: 13px; height: 13px; stroke-width: 2.6; }

.conv-body { padding: 20px 22px; }
.cv-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cv-h .muted { font-size: 13px; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #d23b2e; display: inline-block; animation: rec 1s ease-in-out infinite; }
.line { margin-bottom: 14px; animation: rowIn .35s ease both; animation-delay: calc(var(--i) * 120ms); }
.line > span { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.line p { margin: 4px 0 0; font-size: 15.5px; line-height: 2.05; }
.line.bdrl p { color: var(--ink-soft); }
.line.cli p { background: var(--bg); border-radius: 0 12px 12px 12px; padding: 8px 14px; }
.kw { position: relative; background: transparent; color: inherit; border-radius: 5px; padding: 1px 2px; transition: background .35s ease, color .35s ease, box-shadow .35s ease; }
.kw sup { position: absolute; left: 2px; top: -1.25em; font-size: 10px; font-weight: 800; line-height: 1; white-space: nowrap; color: var(--kc); opacity: 0; transform: translateY(4px); transition: opacity .3s ease .1s, transform .3s ease .1s; pointer-events: none; }
.kw.lit { background: var(--kb); color: var(--kc); font-weight: 700; box-shadow: inset 0 -2px 0 var(--kc); }
.kw.lit sup { opacity: 1; transform: none; }

.conv-ai { border-left: 1px solid var(--line); padding: 20px; background: #fdfdfb; }
.ai-wait { display: flex; gap: 10px; align-items: center; color: var(--ink-mute); font-weight: 600; font-size: 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: blink 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
.conv-ai > * { opacity: 0; }
.conv-ai > .ai-wait { opacity: 1; }
.conv-ai.in > * { animation: slideIn .4s ease both; }
.conv-ai.in > *:nth-child(2) { animation-delay: .1s; } .conv-ai.in > *:nth-child(3) { animation-delay: .2s; }
.conv-ai.in > *:nth-child(4) { animation-delay: .35s; } .conv-ai.in > *:nth-child(5) { animation-delay: .5s; }
.said-real { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.said-real > div { flex: 1; }
.said-real span { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.said-real b { font-size: 16px; }
.said-real .real { background: var(--lime-soft); border-radius: 8px; padding: 6px 10px; }
.said-real .arrow { color: var(--ink-mute); }
.said-real div:first-child b { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .75; }
.ai-note { font-size: 13.5px; color: var(--ink-soft); margin: 10px 0 12px; }
.ai-note.me { background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px; }
.conv-ai .mix .mx-bar { grid-template-columns: 12px 110px 1fr 24px; font-size: 12.5px; }
.act { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.act-h { display: flex; align-items: center; gap: 8px; }
.act-h .pill { margin-left: auto; }
.act p { margin: 8px 0 10px; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 1280px) {
  .conv-grid { grid-template-columns: 250px 1fr; }
  .conv-ai { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .conv-grid { grid-template-columns: 1fr; }
  .conv-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .conv-item { min-width: 220px; }
}

/* notifiche */
.notif { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.notif:first-of-type { border-top: 0; }
.notif .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; flex: 0 0 auto; }
.notif .t { font-weight: 700; }
.notif .d { color: var(--ink-soft); font-size: 14px; }
.notif .pill { margin-left: auto; }
.plan { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.plan li { background: var(--bg); border-radius: 12px; padding: 16px 18px; }
.plan .when { font-weight: 800; }
.plan p { margin: 4px 0 0; color: var(--ink-soft); }

/* toast per le voci bloccate */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3, .g2 { grid-template-columns: 1fr; }
  }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 10px; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .logo, .side-group, .nav-item.locked { display: none; }
  .nav-item { white-space: nowrap; width: auto; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .content { padding: 18px 16px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}
