/*
 * Illustrazioni d'interfaccia della grafica kx (kx/mock.php, kx/mock-landing.php): schede, cornici, tabelle,
 * pastiglie, righe alterne testo/illustrazione. Usato dalla home e dalle landing. Sotto i 40 KB.
 */

/* schede e cornici */
.kx-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.kx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kx-card__head b { font-size: 15px; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.kx-barcode {
    height: 46px; border-radius: 4px; margin-bottom: 8px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 16px);
}
.kx-toast-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; flex: none; }
.kx-toast-ic .kx-ic { width: 20px; height: 20px; }
.kx-hv__toast b, .kx-float b { display: block; color: var(--ink); font-size: 14px; font-weight: 650; }
.kx-hv__toast small, .kx-float small { display: block; color: var(--muted); font-size: 12px; }

/* pastiglie */
.kx-ch { display: inline-block; font-size: 11px; font-weight: 650; padding: 3px 8px; border-radius: 6px; background: var(--brand-pale); color: var(--brand-deep); justify-self: start; }
.kx-ch--amz { background: #fff1db; color: #8a5300; }
.kx-ch--ebay { background: #e8edfd; color: #3046a8; }
.kx-ch--eprice { background: #fde8e6; color: #a8352c; }
.kx-ch--pos { background: #eef0f3; color: #474d5a; }
.kx-st { display: inline-block; font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.kx-st--ok { background: var(--ok-bg); color: var(--ok); }
.kx-st--warn { background: var(--warn-bg); color: var(--warn); }
.kx-st--info { background: var(--info-bg); color: var(--info); }
.kx-st--ko { background: var(--ko-bg); color: var(--ko); }
.kx-carrier { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 3px 8px; border-radius: 5px; background: #1f2a6b; color: #fff; }
.kx-carrier--p { background: #ffd100; color: #1e2a5a; }
.kx-carrier--f { background: #4d148c; }
.kx-carrier--q { background: #e30613; }
.kx-steps { display: grid; gap: 10px; counter-reset: s; }
.kx-steps li { position: relative; padding-left: 28px; color: var(--ink); }
.kx-steps li::before {
    content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--line-2); background: #fff;
}
.kx-steps li.is-done::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.kx-steps li:not(:last-child)::after { content: ""; position: absolute; left: 8px; top: 21px; height: 10px; width: 2px; background: var(--ok); }
.kx-steps small { color: var(--muted); margin-left: 4px; }
/* ---------- righe alterne e illustrazioni ---------- */
.kx-row { display: grid; grid-template-columns: 1fr 1.08fr; gap: 80px; align-items: center; margin-top: 120px; }
.kx-row > *, .kx-hero__grid > *, .kx-ai > * { min-width: 0; }
.kx-row--flip .kx-row__text { order: 2; }
.kx-row__text .kx-h3 { max-width: 20ch; }
.kx-row__text .kx-checks li { color: var(--ink-2); }
.kx-frame { position: relative; padding: 24px; border-radius: var(--radius-lg); background: var(--frame); }
.kx-app { padding: 22px; font-size: 13px; overflow: hidden; }
.kx-app__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kx-app__bar > b { font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.kx-app__filters { display: flex; gap: 6px; }
.kx-app__filters span { font-size: 12px; padding: 5px 10px; border-radius: 7px; background: var(--tint); color: var(--muted); font-weight: 550; }
.kx-app__filters .is-on { background: var(--ink); color: #fff; }
.kx-table { width: 100%; border-collapse: collapse; }
.kx-table th { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 0 8px 10px; border-bottom: 1px solid var(--line); }
.kx-table td { padding: 11px 8px; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.kx-table tr:last-child td { border-bottom: 0; }
.kx-table--tight td { padding: 9px 8px; }
.kx-table__tot td { font-weight: 700; border-top: 1px solid var(--line-2); }
.kx-r { text-align: right !important; }
.kx-float { position: absolute; display: flex; gap: 12px; align-items: center; padding: 14px 16px; box-shadow: var(--shadow-lg); }
.kx-float--br { right: -28px; bottom: -28px; }
.kx-float--tr { right: -28px; top: -28px; }
.kx-float--tl { left: -28px; top: -28px; }
.kx-btn-fake { font-size: 12px; font-weight: 650; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--ink); }
.kx-btn-fake--primary { display: block; text-align: center; margin-top: 16px; padding: 11px; background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; font-size: 13px; }
.kx-inv__meta { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 12px; padding: 14px; border-radius: 10px; background: var(--tint); margin-bottom: 14px; }
.kx-inv__meta small { display: block; font-size: 11px; color: var(--muted); }
.kx-inv__meta b { color: var(--ink); font-size: 13px; }
.kx-sdi { display: block; width: 230px; font-size: 13px; }
.kx-sdi > b { margin-bottom: 12px; }
.kx-ship__carriers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kx-ship__carriers label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; flex-wrap: wrap; }
.kx-ship__carriers label i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.kx-ship__carriers label small { width: 100%; color: var(--muted); font-size: 11px; padding-left: 26px; }
.kx-ship__carriers .is-on { border-color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-pale); }
.kx-ship__carriers .is-on i { border: 5px solid var(--brand-ink); }
.kx-ship__row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.kx-ship__row span { color: var(--muted); }
.kx-ship__row b { color: var(--ink); }
.kx-track .kx-toast-ic { background: var(--info-bg); color: var(--info); }
.kx-shop { padding: 0; }
.kx-shop__nav { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.kx-shop__nav b { color: var(--ink); font-size: 16px; letter-spacing: -.02em; margin-right: auto; font-weight: 750; }
.kx-shop__cart { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.kx-shop__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px; }
.kx-shop__img { aspect-ratio: 4 / 5; border-radius: 10px; margin-bottom: 10px; position: relative; overflow: hidden; }
.kx-shop__img::after { content: ""; position: absolute; left: 30%; right: 30%; top: 26%; bottom: 18%; border-radius: 40% 40% 8px 8px; background: rgba(255, 255, 255, .55); }
.kx-shop__item b { display: block; color: var(--ink); font-size: 13px; }
.kx-shop__item span { color: var(--muted); }
.kx-pay { display: block; padding: 14px 16px; }
.kx-pay small { color: var(--muted); font-size: 11px; }
.kx-pay div { display: flex; gap: 6px; margin-top: 6px; }
.kx-pay span { font-size: 12px; font-weight: 650; padding: 5px 9px; border-radius: 6px; background: var(--tint); color: var(--ink); }
/* chat dell'assistente */
.kx-chat { display: none; flex-direction: column; gap: 14px; flex: 1; }
.kx-chat.is-on { display: flex; }
html:not(.kx-js) .kx-chat:first-child { display: flex; }
.kx-chat__head { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.kx-chat__head b { color: var(--ink); font-size: 15px; }
.kx-chat__head small { color: var(--ok); font-size: 12px; font-weight: 600; margin-left: auto; }
.kx-chat__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.kx-chat__msg { max-width: 82%; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: var(--tint); color: var(--ink); font-size: 15px; line-height: 1.5; }
.kx-chat__msg--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--brand-ink); color: #fff; }

/* ---------- adattamento ---------- */
@media (max-width: 1024px) {
    .kx-row { grid-template-columns: 1fr; gap: 48px; margin-top: 96px; }
    .kx-row--flip .kx-row__text { order: 0; }
    .kx-row__visual { padding: 0 28px 28px 0; }
}
@media (max-width: 640px) {
    .kx-row__visual { padding: 0; }
    .kx-frame { padding: 14px; border-radius: 20px; }
    .kx-float { position: relative; inset: auto; margin: 14px 0 0; }
    .kx-sdi, .kx-pay { width: auto; }
    .kx-hide-s { display: none; }
    .kx-app { padding: 16px; }
    .kx-inv__meta { grid-template-columns: 1fr 1fr; }
    .kx-shop__grid { gap: 10px; padding: 14px; }
    .kx-shop__nav span { display: none; }
    .kx-chat__msg { max-width: 92%; }
}

/* ---------- illustrazioni delle landing (kx/mock-landing.php) ---------- */
.kx-toast-ic--warn { background: var(--warn-bg); color: var(--warn); }
.kx-toast-ic--info { background: var(--info-bg); color: var(--info); }
/* CRM a colonne */
.kx-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kx-board__col { min-width: 0; background: var(--tint); border-radius: 10px; padding: 9px 8px; display: grid; gap: 8px; align-content: start; border-top: 3px solid var(--c); }
.kx-board__h { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.kx-board__h b { overflow: hidden; text-overflow: ellipsis; }
.kx-board__h i { font-style: normal; font-size: 11px; color: var(--muted); }
.kx-board__card { background: #fff; border-radius: 8px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(17, 19, 24, .06); }
.kx-board__card b { display: block; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kx-board__card small { display: block; font-size: 11px; color: var(--muted); }
.kx-board__card span { display: block; font-size: 12px; font-weight: 650; color: var(--ink); margin-top: 4px; }
/* canali */
.kx-chan__prod { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--tint); margin-bottom: 12px; }
.kx-chan__img { width: 52px; height: 52px; border-radius: 12px; background: #fff; color: var(--brand-ink); display: grid; place-items: center; }
.kx-chan__prod b { display: block; font-size: 15px; color: var(--ink); }
.kx-chan__prod small { color: var(--muted); font-size: 11px; }
.kx-chan__qty { text-align: right; }
.kx-chan__qty b { font-size: 24px; letter-spacing: -.03em; }
.kx-chan__list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.kx-chan__list li:last-child { border-bottom: 0; }
.kx-chan__list b { color: var(--ink); font-weight: 600; }
.kx-chan__ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-pale); color: var(--brand-ink); display: grid; place-items: center; }
.kx-chan__ic .kx-ic { width: 17px; height: 17px; }
/* ticket */
.kx-tk { display: grid; grid-template-columns: 200px 1fr; padding: 0; }
.kx-tk__list { border-right: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; align-content: start; }
.kx-tk__list div { padding: 10px; border-radius: 9px; }
.kx-tk__list .is-on { background: var(--brand-pale); }
.kx-tk__list b { display: block; font-size: 12px; color: var(--ink); }
.kx-tk__list small { font-size: 11px; color: var(--muted); }
.kx-tk__conv { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kx-tk__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--ink); }
.kx-tk .kx-chat__msg { font-size: 13px; padding: 11px 13px; }
.kx-tk__note { font-size: 11px; color: var(--muted); }
/* team */
.kx-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kx-week div { min-height: 96px; border-radius: 10px; background: var(--tint); padding: 8px; display: grid; gap: 6px; align-content: start; }
.kx-week small { font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kx-week span { font-size: 11px; line-height: 1.3; padding: 5px 7px; border-radius: 6px; background: #fff; color: var(--ink); border-left: 3px solid var(--c); }
.kx-tasks li { display: grid; grid-template-columns: auto 1fr 90px auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kx-tasks b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kx-tasks__cb { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: grid; place-items: center; }
.kx-tasks__cb.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.kx-tasks__cb .kx-ic { width: 13px; height: 13px; stroke-width: 3; }
.kx-tasks__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.kx-tasks__bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.kx-tasks__av { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
/* permessi */
.kx-table--perm td, .kx-table--perm th { text-align: center; }
.kx-table--perm td:first-child, .kx-table--perm th:first-child { text-align: left; }
.kx-perm { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 7px; font-size: 11px; font-weight: 650; }
.kx-perm .kx-ic { width: 14px; height: 14px; stroke-width: 3; }
.kx-perm--y { background: var(--ok-bg); color: var(--ok); }
.kx-perm--r { background: var(--info-bg); color: var(--info); padding: 0 8px; }
.kx-perm--n { color: var(--muted); }
/* bandi */
.kx-bando { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.kx-bando__ring {
    width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(closest-side, #fff 76%, transparent 77%), conic-gradient(var(--brand-ink) calc(var(--p) * 1%), var(--line) 0);
}
.kx-bando__ring b { font-size: 28px; letter-spacing: -.03em; color: var(--ink); }
.kx-bando__t { display: block; font-size: 16px; color: var(--ink); margin: 10px 0 10px; line-height: 1.3; }
.kx-bando__list { display: grid; gap: 7px; }
.kx-bando__list li { position: relative; padding-left: 22px; font-size: 13px; color: var(--ink-2); }
.kx-bando__list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--ok); }
.kx-bando__list .is-wait::before { background: var(--amber-dot); }
@media (max-width: 640px) {
    .kx-board { grid-template-columns: 1fr 1fr; }
    .kx-tk { grid-template-columns: 1fr; }
    .kx-tk__list { border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
    .kx-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kx-week div:nth-child(n+4) { display: none; }
    .kx-tasks li { grid-template-columns: auto 1fr auto; }
    .kx-tasks__bar { display: none; }
    .kx-bando { grid-template-columns: 1fr; justify-items: start; }
    .kx-chan__list li { grid-template-columns: auto 1fr auto; }
    .kx-chan__list .kx-num { display: none; }
    /* permessi: su smartphone restano area, titolare e amministrazione */
    .kx-table--perm th:nth-child(n+4), .kx-table--perm td:nth-child(n+4) { display: none; }
}
