/* F7-05 Cockpit v2: coda Founder, vendite PULSE, automazioni, grafo, chiedi. */
.ck-page .ag-kpis { margin-bottom: 26px; }
.ck-section { margin: 0 0 34px; scroll-margin-top: 18px; }
.ck-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.ck-section-head h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.ck-card { border: 1px solid var(--line); background: rgba(10, 23, 37, .92); border-radius: 16px; padding: 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.ck-card h3 { margin: 2px 0 4px; font-size: 1rem; }
.ck-card label { display: grid; gap: 5px; font-size: .78rem; color: var(--muted); }
.ck-card select, .ck-queue select, .ck-contacts select { font: inherit; color: var(--text); background: #08131f; border: 1px solid #23405f; border-radius: 10px; padding: 9px 10px; width: 100%; }
.ck-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ck-error { color: #ff9ca1; margin: 0; }
.ck-login { display: grid; place-items: start; margin: 8px 0 30px; }
.ck-login .auth-card { width: min(420px, 100%); }

/* Coda Founder */
.ck-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ck-item { border: 1px solid var(--line); border-left: 4px solid #35587e; background: rgba(10, 23, 37, .94); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; min-width: 0; }
.ck-item.p1 { border-left-color: #ff7b82; }
.ck-item.p2 { border-left-color: #f2c85b; }
.ck-item.type-dm { border-left-color: #7fe0ae; }
.ck-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ck-item-head strong { font-size: .98rem; overflow-wrap: anywhere; }
.ck-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ck-tag { border: 1px solid #2b4866; border-radius: 999px; padding: 2px 9px; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: #b9cbe0; }
.ck-tag.agent { color: #07111d; background: #d9eaff; border-color: #d9eaff; }
.ck-detail { margin: 0; color: #a9bbcf; font-size: .82rem; overflow-wrap: anywhere; }
.ck-proposal { border-radius: 10px; background: #0d2034; border: 1px solid #1d3a58; padding: 10px 12px; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ck-proposal-label { font-size: .68rem; letter-spacing: .1em; color: #7ea8d7; font-weight: 850; margin: 0 0 4px; }
.ck-item textarea { min-height: 92px; font-size: .9rem; line-height: 1.45; }
.ck-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ck-actions .button { padding: 8px 13px; font-size: .8rem; }
.ck-actions a { font-size: .8rem; color: #9ed0ff; }
.ck-item.busy { opacity: .55; pointer-events: none; }
.ck-empty { color: var(--muted); font-size: .88rem; padding: 14px 0; list-style: none; }

/* Vendite */
.ck-funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ck-step { border: 1px solid var(--line); background: rgba(10, 23, 37, .9); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.ck-step strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ck-step span { font-size: .72rem; color: var(--muted); }
.ck-bar { height: 5px; border-radius: 999px; background: #13283f; overflow: hidden; }
.ck-bar i { display: block; height: 100%; background: #7fe0ae; border-radius: 999px; }
.ck-step.goal strong { color: #7fe0ae; }
.ck-sales-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
.ck-contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 620px; overflow: auto; }
.ck-contact { border: 1px solid #22384f; border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; background: #0b1828; }
.ck-contact-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .86rem; }
.ck-contact-head span { color: var(--muted); font-size: .74rem; }
.ck-contact-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.ck-contact-row textarea { min-height: 40px; height: 40px; font-size: .84rem; }
.ck-contact-row .button { padding: 8px 12px; font-size: .78rem; }

/* Automazioni e messaggi */
.ck-auto, .ck-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck-auto li, .ck-messages li { border: 1px solid #22384f; border-radius: 12px; padding: 10px 12px; background: #0b1828; display: grid; gap: 4px; min-width: 0; }
.ck-auto .row, .ck-messages .row { display: flex; justify-content: space-between; gap: 8px; font-size: .72rem; color: var(--muted); flex-wrap: wrap; }
.ck-auto strong { font-size: .88rem; overflow-wrap: anywhere; }
.ck-status { font-weight: 800; }
.ck-status.running, .ck-status.claimed { color: #7fe0ae; }
.ck-status.retry { color: #f2c85b; }
.ck-messages p { margin: 0; font-size: .86rem; white-space: pre-wrap; overflow-wrap: anywhere; color: #d5e1ee; }
.ck-messages li.founder { border-color: #2b4866; background: #0d1d30; }

.ck-toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: min(420px, calc(100vw - 36px)); border-radius: 12px; padding: 12px 14px; background: #0d2219; border: 1px solid #2c6d50; color: #c9f5dd; font-size: .86rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.ck-toast.error { background: #2a1114; border-color: #7a3238; color: #ffc9cc; }

@media (max-width: 1100px) {
  .ck-sales-grid { grid-template-columns: 1fr; }
  .ck-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ck-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ck-contact-row { grid-template-columns: 1fr; }
  .ck-row { grid-template-columns: 1fr; }
  .ck-actions .button { flex: 1 1 auto; }
}
.ck-actions .button.ghost { width: auto; }
.ck-item.type-dm textarea { min-height: 128px; }
