/* Standard UX/UI — sezione platform (passaggio globale 28-set).
 * Solo regole specifiche della sezione: i pattern condivisi (pill .jo-qf,
 * KPI .jo-kpi, tabelle, testate) stanno in joorna-standard.css. */

/* Layout (mockup VIEWS.dashboard): KPI → grafici 2:1 → tre card. */
.jo-hd {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Da vedere: scorciatoie verso le sezioni, una riga ciascuna. */
.jo-hd-links {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.jo-hd-links > li + li { border-top: 1px solid var(--jo-ui-line-2); }

/* Liste lunghe nei riquadri (Dashboard generale ▸ Strutture con qualcosa da fare e
   Hotel che non entrano, owner 18-nov-2026): ci sono tutte le righe; la lista riempie
   il riquadro, che il vicino di riga può allungare, ed è alta almeno --jo-list-rows
   righe (al massimo 8, lo dice la vista); il resto si scorre dentro. Il margine
   laterale lascia spazio al fondo lilla delle righe al passaggio. «relative»:
   il testo per il lettore di schermo delle righe nascoste («Entra in …», .sr-only,
   assoluto) resta dentro la lista; senza, allungava la pagina di 800px. */
.jo-hd-w .jo-hd-scroll {
    position: relative;
    flex: 1 1 0;
    min-height: calc(var(--jo-list-rows, 8) * 51px);
    margin-right: -8px;
    margin-left: -8px;
    padding: 0 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.jo-hd-link {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto 16px;
    gap: 10px;
    align-items: center;
    margin: 0 -8px;
    padding: 7px 8px;
    border-radius: 8px;
    transition: background-color .12s ease;
}

a.jo-hd-link:hover,
button.jo-hd-link:hover { background: var(--ds-accent-soft); }
a.jo-hd-link:hover b,
button.jo-hd-link:hover b { color: var(--ds-accent-fg); }
a.jo-hd-link:focus-visible,
button.jo-hd-link:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }

/* La riga che è un pulsante (Dashboard generale: entra nell'hotel,
   general-dashboard/enter-hotel) è larga e allineata come quelle coi link. */
button.jo-hd-link { width: calc(100% + 16px); text-align: left; }

.jo-hd-link .jo-kpi-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--jo-ui-soft);
    color: var(--jo-ui-muted);
}

.jo-hd-link .jo-kpi-ic svg { width: 15px; height: 15px; }

.jo-hd-link b { display: block; font-size: 13px; font-weight: 600; color: var(--jo-ui-ink); }
.jo-hd-link small { display: block; font-size: 12px; color: var(--jo-ui-muted); }

.jo-hd-link-v {
    font-size: 16px;
    font-weight: 700;
    color: var(--jo-ui-ink);
    font-variant-numeric: tabular-nums;
}

/* Occupazione camere giorno per giorno: una riga per camera, un pallino per notte. */
.jo-occ-card .jo-hd-card-h { align-items: flex-start; }
.jo-occ-card .jo-hd-card-h .jo-an-card-hint { margin: 2px 0 0; }

.jo-occ-nav {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 2px;
}

.jo-occ-nav svg { width: 16px; height: 16px; }

.jo-occ-today {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--jo-ui-ink);
}

.jo-occ-today:hover:not(:disabled) { background: var(--ds-accent-soft); color: var(--ds-accent-fg); }
.jo-occ-today:disabled { color: var(--jo-ui-muted); opacity: .6; cursor: default; }

.jo-occ-scroll {
    max-height: 330px;
    overflow: auto;
}

.jo-occ {
    width: 100%;
    min-width: calc(130px + var(--jo-occ-days) * 18px);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.jo-occ th,
.jo-occ td {
    padding: 0;
    text-align: center;
}

.jo-occ thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-bottom: 6px;
    background: var(--ds-surface);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--jo-ui-muted);
    font-variant-numeric: tabular-nums;
}

.jo-occ thead th span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.jo-occ thead th.is-weekend { color: var(--jo-ui-ink); }

.jo-occ .jo-occ-room {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 130px;
    padding-right: 10px;
    background: var(--ds-surface);
    text-align: left;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--jo-ui-ink);
}

.jo-occ .jo-occ-room span { display: block; }

.jo-occ tbody td,
.jo-occ tbody th { height: 30px; }

/* Riga "Occupate": camere occupate per notte, sotto la griglia. */
.jo-occ tfoot td,
.jo-occ tfoot th {
    height: 26px;
    border-top: 1px solid var(--jo-ui-line-2);
    font-size: 11px;
    font-weight: 600;
    color: var(--jo-ui-muted);
    font-variant-numeric: tabular-nums;
}

.jo-occ tfoot .jo-occ-room { font-size: 12px; color: var(--jo-ui-muted); }

.jo-occ .is-today { background: var(--ds-accent-soft); }
.jo-occ thead th.is-today { color: var(--ds-accent-fg); border-radius: 6px 6px 0 0; }

.jo-occ-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--ds-border-strong);
    border-radius: 999px;
    font-size: 8.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    color: var(--ds-surface);
}

.jo-occ-dot.is-on {
    border-color: transparent;
    background: var(--jo-primary-400);
    cursor: default;
}

.jo-occ-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--jo-ui-line-2);
    font-size: 12px;
    color: var(--jo-ui-muted);
}

.jo-occ-legend > span { display: inline-flex; align-items: center; gap: 6px; }

.jo-occ-today-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--ds-accent-soft);
}

.jo-occ-count { margin-left: auto; }

.jo-hd-go {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--jo-ui-muted);
}

.jo-hd-card-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jo-hd-card-h { margin-bottom: 12px; }

.jo-hd-card-h h3 { margin: 0; }

/* Il rimando del riquadro alla sua pagina: solo l'icona di Apri, nella
   testata (hotel-dashboard/card-link, UX 5-nov-2026). Nelle bacheche sta a
   sinistra degli strumenti del widget (trascina, nascondi), che compaiono
   nell'angolo e lo coprivano. */
.jo-hd-card-link { flex-shrink: 0; }
/* Alta quanto il titolo: le testate restano alte uguali (69px). */
.jo-hd-w .jo-hd-card-link { margin: -3px 56px -3px 0; }

@media (hover: none) {
    .jo-hd-w .jo-hd-card-link { margin-right: 26px; }
}

.jo-hd-card-h + .jo-hd-stats { margin-top: 0; }

/* Attività recenti (D2, 9-nov-2026): righe brevi, il tipo in grassetto e
   sotto chi e da dove, a destra quando. */
.jo-hd-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jo-hd-timeline > li {
    padding: 9px 0;
    border-top: 1px solid var(--jo-ui-line-2);
    font-size: 13.5px;
}

.jo-hd-timeline > li:first-child { border-top: 0; }

.jo-hd-timeline b {
    display: block;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-hd-timeline span {
    display: block;
    font-size: 12.5px;
    color: var(--jo-ui-muted);
}

/* Attività recenti: tutta la riga apre la sua pagina, con la freccia in
   fondo e il fondo lilla al passaggio come le righe di Oggi e Da vedere
   (UX 5-nov-2026, lista di controllo 3). */
.jo-hd-timeline > li { padding: 0; }

/* Contesto, non un risultato (cliente 6-nov-2026): righe basse, titolo
   medio, icona e ora tenui, così non pesa più dei numeri della pagina. */
.jo-hd-tl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 16px;
    gap: 10px;
    align-items: center;
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background-color .12s ease;
}

a.jo-hd-tl-row:hover { background: var(--ds-accent-soft); }
a.jo-hd-tl-row:hover b { color: var(--ds-accent-fg); }
a.jo-hd-tl-row:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }

.jo-hd-timeline time {
    font-size: 12px;
    color: var(--jo-ui-muted);
    white-space: nowrap;
}

.jo-hd-none {
    color: var(--jo-ui-muted);
}

/* Chatbot: quattro numeri e l'esito delle conversazioni. */
.jo-hd-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.jo-hd-stats > div {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--jo-ui-soft);
}

.jo-hd-stats dt { font-size: 12px; color: var(--jo-ui-muted); }
.jo-hd-stats dd { font-size: 17px; font-weight: 700; color: var(--jo-ui-ink); }

.jo-hd-outcomes { margin-top: 12px; }

.jo-hd-outcomes .jo-hd-bar-row { font-size: 12px; }

.jo-hd-outcomes b { width: 34px; text-align: right; color: var(--jo-ui-ink); }

.jo-hd-out-l {
    flex: 0 0 132px;
    color: var(--jo-ui-muted);
}

.jo-hd-more { align-self: flex-start; }

/* Barre di avanzamento (prova moduli, open rate segmenti). */
.jo-hd-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.jo-hd-bar {
    flex: 1;
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--jo-ui-line-2);
    overflow: hidden;
}

.jo-hd-bar > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--jo-ui-accent);
}

.jo-hd-bar > i.is-ok { background: var(--jo-ui-ok); }
.jo-hd-bar > i.is-danger { background: var(--jo-ui-danger); }

/* Tre KPI su una riga da tablet in su (Attività comunicazioni, Profilo ospiti, Piano & Moduli). */
@media (min-width: 768px) {
    .jo-kpis.jo-kpis--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Due KPI (schede con due numeri): metà riga ciascuno, non due sesti. */
@media (min-width: 768px) {
    .jo-kpis.jo-kpis--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* «Dato di gruppo»: l'icona del gruppo accanto al valore di un .jo-kpi che non segue il
   filtro Struttura (Ospiti e segmenti; owner 9-nov-2026, al posto della pill nella nota). */
.jo-kpi-group {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
    color: var(--ds-text-tertiary);
    cursor: help;
}

.jo-kpi-group svg { width: 14px; height: 14px; }

/* Dettagli sotto una riga di segmento (Risultati per segmento). */
.jo-tseg-facts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: auto 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--jo-ui-line-2);
    font-size: 12.5px;
}

.jo-tseg-facts > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.jo-tseg-facts dt {
    color: var(--jo-ui-muted);
}

.jo-tseg-facts dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Performance ▸ Email e automazioni (revisione 19-ott-2026) ─────────────
   Risultati per segmento: una riga per segmento (segment-performance.blade.php),
   la freccia apre importi e canali. Prestazioni delle campagne: sotto i 640px
   ogni campagna è una card con le etichette (jo-mtable--cards). */
.jo-segperf { display: flex; flex-direction: column; }
.jo-segperf-head,
.jo-segperf-row > summary {
    display: grid;
    /* La colonna del tasso di apertura porta anche la barretta: più larga, così il
       valore non tocca la colonna dopo nella card stretta (16-nov-2026). */
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.8fr) repeat(2, minmax(0, 1fr)) 16px;
    align-items: center;
    gap: 12px;
}
.jo-segperf-head {
    padding: 0 0 6px;
    border-bottom: 1px solid var(--jo-ui-line-2);
    font-size: 12px;
    font-weight: 600;
    color: var(--ds-text-tertiary, #5B5B6B);
}
.jo-segperf-head::after { content: ""; }
.jo-segperf .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Nella card stretta le intestazioni lunghe («Tasso di apertura») vanno a capo invece di
   sovrapporsi alla colonna accanto (16-nov-2026); le cifre delle righe restano su una riga. */
.jo-segperf-head { align-items: end; }
.jo-segperf-head .num { white-space: normal; line-height: 1.25; }
.jo-segperf-row { border-bottom: 1px solid var(--jo-ui-line-2); }
.jo-segperf-row:last-child { border-bottom: 0; }
.jo-segperf-row > summary {
    padding: 9px 0;
    font-size: 13.5px;
    color: var(--ds-text-secondary, #3F3F46);
    list-style: none;
    cursor: pointer;
}
.jo-segperf-row > summary::-webkit-details-marker { display: none; }
.jo-segperf-row > summary::after {
    content: "";
    justify-self: end;
    width: 7px;
    height: 7px;
    border-right: 1.75px solid var(--ds-text-tertiary, #5B5B6B);
    border-bottom: 1.75px solid var(--ds-text-tertiary, #5B5B6B);
    transform: rotate(45deg);
    transition: transform .15s ease;
}
.jo-segperf-row[open] > summary::after { transform: rotate(-135deg); }
.jo-segperf-name { display: flex; flex-direction: column; min-width: 0; }
.jo-segperf-name b { overflow: hidden; font-weight: 600; color: var(--ds-text-primary, #18181B); text-overflow: ellipsis; white-space: nowrap; }
.jo-segperf small { font-size: 12px; font-weight: 400; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-segperf-row .jo-tseg-facts { margin: 0 0 10px; padding: 8px 0 0; }

/* Ospiti e segmenti ▸ I segmenti più performanti (owner 21-ott-2026): le stesse
   righe, ognuna un link al dettaglio del segmento, con l'andamento a pallino. */
.jo-segperf--top .jo-segperf-head,
.jo-segperf-link {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) repeat(5, minmax(0, .7fr)) minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(150px, 1.3fr) 16px;
    column-gap: 16px;
    align-items: center;
    gap: 12px;
}
.jo-segperf--top .jo-segperf-head { padding: 0 8px 6px; margin: 0 -8px; }
.jo-segperf--top .jo-segperf-head > span:last-of-type,
.jo-segperf-link > [data-label="Andamento"] { padding-left: 16px; }
.jo-segperf-link {
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--ds-text-secondary, #3F3F46);
    transition: background .15s;
}
.jo-segperf-link:hover { background: var(--ds-row-hover, #F4F0FF); }
.jo-segperf-link::after {
    content: "";
    justify-self: end;
    width: 7px;
    height: 7px;
    border-top: 1.75px solid var(--ds-text-tertiary, #5B5B6B);
    border-right: 1.75px solid var(--ds-text-tertiary, #5B5B6B);
    transform: rotate(45deg);
}
.jo-segperf-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-segperf-share { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-segperf .jo-empty-dash { color: var(--ds-empty, #8A8A99); }
.jo-an.jo-an-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

@media (max-width: 639px) {
    /* Sul telefono ogni riga ha le sue etichette: la testata non serve (anche quella dei
       «segmenti più performanti», più forte qui sopra: le colonne si accavallavano). */
    .jo-segperf-head,
    .jo-segperf--top .jo-segperf-head { display: none; }
    .jo-segperf-row > summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
    .jo-segperf-row > summary::after { display: none; }
    .jo-segperf-name { grid-column: 1 / -1; }
    .jo-segperf-row > summary > .num { display: flex; justify-content: space-between; gap: 6px; text-align: left; }
    .jo-segperf-row > summary > .num::before { content: attr(data-label); color: var(--ds-text-tertiary, #5B5B6B); font-size: 12px; }
    .jo-segperf-link { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
    .jo-segperf-link::after { display: none; }
    .jo-segperf-link > [data-label] { display: flex; justify-content: space-between; gap: 6px; text-align: left; }
    .jo-segperf-link > [data-label]::before { content: attr(data-label); color: var(--ds-text-tertiary, #5B5B6B); font-size: 12px; }
    /* Il valore resta nella sua metà: «● In crescita +154,9%» non esce dallo schermo. */
    .jo-segperf-link > [data-label] { min-width: 0; }
    .jo-segperf-link > [data-label] > *:not(small) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .jo-segperf-link > [data-label="Andamento"] { grid-column: 1 / -1; padding-left: 0; }

    .jo-mtable.jo-mtable--cards,
    .jo-mtable.jo-mtable--cards tbody,
    .jo-mtable.jo-mtable--cards tr,
    .jo-mtable.jo-mtable--cards td { display: block; width: 100%; }
    .jo-mtable.jo-mtable--cards thead { display: none; }
    .jo-mtable.jo-mtable--cards tr { padding: 10px 0; border-bottom: 1px solid var(--jo-ui-line-2); }
    .jo-mtable.jo-mtable--cards tr:last-child { border-bottom: 0; }
    .jo-mtable.jo-mtable--cards td { padding: 2px 0; border: 0; }
    .jo-mtable.jo-mtable--cards td.jo-mtable-title { padding-bottom: 4px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
    .jo-mtable.jo-mtable--cards td.num { display: flex; justify-content: space-between; gap: 12px; text-align: right; white-space: normal; }
    .jo-mtable.jo-mtable--cards td.num::before { content: attr(data-label); color: var(--ds-text-tertiary, #5B5B6B); font-weight: 400; text-align: left; }
}

/* Ospiti e segmenti in un gruppo, telefono (9-nov-2026): nella testata
   standard «Struttura», periodo ed esportazione stavano su una riga sola
   (561px) e, con il wrap di joorna-refine sulla testata in colonna, titolo e
   descrizione uscivano dallo schermo. Qui la testata non va a capo e le
   azioni sì: Struttura sopra, periodo ed esportazione sotto, a destra. */
@media (max-width: 639px) {
    .fi-header:has(> div:last-child > .jo-lsf) { flex-wrap: nowrap; }
    .fi-header > div:last-child:has(> .jo-lsf) { flex-wrap: wrap; justify-content: flex-end; flex-shrink: 1; min-width: 0; max-width: 100%; row-gap: 8px; }
    .fi-header > div:last-child:has(> .jo-lsf) > .fi-ac { width: auto; }
}

/* Ospiti e segmenti (D2, verifica 9-nov-2026): l'icona Apri della card sta
   sulla riga del titolo come nella Panoramica; Filament centrava headerEnd
   fra titolo e descrizione. */
.fi-page.jo-pano .fi-section-header > .flex:has(> .jo-hd-card-link) { align-items: flex-start; }
.fi-page.jo-pano .fi-section-header > .flex > .jo-hd-card-link { margin-top: -3px; }

/* ── Amministrazione ▸ Piano & Moduli: un riquadro a righe ─────────
   Icona · modulo (nome + descrizione su una riga) · stato (pallino) ·
   scadenza · azione. Stesse superfici e bordi delle tabelle. */
.jo-plan {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-rest);
    overflow: hidden;
}

.jo-plan-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ds-row-divider);
    background: var(--ds-surface-sunken);
}

.jo-plan-head h3 {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ds-text-tertiary);
}

.jo-plan-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jo-plan-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 150px 210px auto;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 8px 16px;
}

.jo-plan-row + .jo-plan-row {
    border-top: 1px solid var(--ds-row-divider);
}

.jo-plan-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ds-surface-sunken);
    color: var(--ds-text-tertiary);
}

.jo-plan-ic svg {
    width: 17px;
    height: 17px;
}

.jo-plan-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.jo-plan-name strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ds-text-primary);
}

.jo-plan-name span {
    overflow: hidden;
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ds-text-tertiary);
}

.jo-plan-detail {
    font-size: 12.5px;
    color: var(--ds-text-secondary);
}

.jo-plan-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

/* Azioni del modulo solo icona (16px su area 32px); il fulmine "Attiva subito" è l'azione principale, in viola. */
.jo-plan-actions { gap: 2px; }
.jo-plan-actions .jo-icon-btn { width: 32px; height: 32px; }
.jo-plan-actions .jo-icon-btn.is-primary { color: var(--ds-accent, #7C5CCB); }
.jo-plan-actions .jo-icon-btn.is-primary:hover,
.jo-plan-actions .jo-icon-btn.is-primary:focus-visible {
    background: var(--ds-accent-soft, #F3EEFC);
    color: var(--ds-accent, #7C5CCB);
}

.jo-plan-foot {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--ds-row-divider);
    font-size: 13px;
    color: var(--ds-text-tertiary);
}

.jo-plan-group + .jo-plan-group .jo-plan-head {
    border-top: 1px solid var(--ds-row-divider);
}

/* Barra della vista: conteggio a sinistra, Lista | Card a destra (come le tabelle). */
.jo-plan-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ds-row-divider);
    font-size: 12.5px;
    color: var(--ds-text-tertiary);
}

/* Vista Card: stesse voci, in tessere — icona e nome, descrizione intera,
   stato e scadenza, azione in fondo. */
.jo-plan--cards .jo-plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 12px 16px 16px;
}

.jo-plan--cards .jo-plan-row {
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    align-items: start;
    row-gap: 8px;
    column-gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-surface);
}

.jo-plan--cards .jo-plan-row + .jo-plan-row { border-top: 1px solid var(--ds-border); }

.jo-plan--cards .jo-plan-name span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
}

.jo-plan--cards .jo-plan-row > .jo-cell-status { grid-column: 1 / -1; }
.jo-plan--cards .jo-plan-row > .jo-plan-detail { grid-column: 1 / -1; margin-top: -4px; }

.jo-plan--cards .jo-plan-row > .jo-plan-actions {
    grid-column: 1 / -1;
    align-self: end;
    justify-content: flex-start;
}

.jo-plan--cards .jo-plan-actions:empty { display: none; }

/* Tablet e telefono: stato e scadenza sotto il nome, azione a capo. */
@media (max-width: 900px) {
    .jo-plan-row {
        grid-template-columns: 32px minmax(0, 1fr);
        row-gap: 4px;
    }

    .jo-plan-row > .jo-cell-status,
    .jo-plan-row > .jo-plan-detail,
    .jo-plan-row > .jo-plan-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
}

/* ── Assistenza ───────────────────────────────────────────────────
   Card sempre aperte una sotto l'altra (owner 15-ott-2026). */
.jo-assist {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Revisione 19-ott-2026: il messaggio è un'area di quattro righe a tutta
   larghezza, Invia sotto a destra. */
.jo-assist-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.jo-assist-form > .fi-fo-component-ctn {
    flex: 1 1 auto;
    min-width: 0;
    row-gap: 16px;
}

.jo-assist-submit {
    display: flex;
    flex: none;
    justify-content: flex-end;
}

/* Contatti e scorciatoie: righe icona in tessera · testo (· freccia). */
.jo-assist-rows {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.jo-assist-rows > li + li {
    border-top: 1px solid var(--ds-row-divider, var(--ds-border));
}

.jo-assist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -8px;
    padding: 9px 8px;
    border-radius: 8px;
    color: var(--ds-text-secondary);
}

a.jo-assist-row[href]:hover {
    background: var(--ds-row-hover, #F6F2FD);
}

.jo-assist-ic {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ds-accent-soft, #F1EAFD);
    color: var(--ds-accent, #7145D9);
}

.jo-assist-ic svg {
    width: 16px;
    height: 16px;
}

.jo-assist-row-txt {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.jo-assist-row-txt b {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ds-text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-assist-row-txt small {
    font-size: 12px;
    color: var(--ds-text-tertiary);
}

.jo-assist-go {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--ds-text-tertiary);
}

/* Novità: il mese in una piccola etichetta, il titolo, i punti; una riga
   ciascuna (revisione 19-ott-2026: testo lungo → puntini, intero nel tooltip). */
.jo-assist-news {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.jo-assist-news-label {
    display: inline-flex;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--ds-surface-2, #F3F4F8);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ds-text-tertiary);
}

.jo-assist-news-title {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-text-primary);
}

.jo-assist-news ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--ds-text-secondary);
}

.jo-assist-news-title,
.jo-assist-news li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-assist-news li {
    position: relative;
    padding-left: 16px;
}

.jo-assist-news li::before {
    content: "";
    position: absolute;
    top: .55em;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--ds-lime-strong, #9DBB1A);
}

/* ── Panoramica: widget scelti dall'utente (owner 2-ott-2026) ────────────
 * Righe scelte dall'utente (owner 9-ott-2026: "lo metto tra due grafici e si
 * mette tra quei due, gli altri si restringono"): ogni riga è una riga flex
 * (.jo-hd-break la chiude, DashboardWidgets::rowStarts); nella riga i widget
 * si dividono lo spazio secondo il tipo — gli andamenti nel tempo ('wide')
 * prendono il doppio degli altri, nessuno scende sotto un terzo (massimo 3
 * per riga, il quarto va sotto), 'full' sempre da solo. Le righe di partenza
 * le fa DashboardWidgets::rowStarts con le misure del catalogo. Le card della stessa
 * riga alte uguali, il piede in fondo. Sotto i 1100px uno per riga. */
.jo-hd-board {
    display: flex;
    flex-wrap: wrap;
    column-gap: 16px;
    align-items: stretch;
}

/* La distanza fra le righe la dà il margine sotto i widget: il fine riga non la raddoppia. */
.jo-hd-board > * { flex: 1 1 100%; margin-bottom: 16px; }

/* Fine riga: un elemento alto zero largo tutta la riga. */
.jo-hd-board > .jo-hd-break { flex: 0 0 100%; height: 0; margin: 0; }

@media (min-width: 1100px) {
    .jo-hd-board > .jo-hd-w { flex: 1 1 0; min-width: calc((100% - 32px) / 3); }
    .jo-hd-board > .jo-hd-w--wide { flex-grow: 2; }
    /* A riga intera di partenza (la riga la chiude rowStarts); accanto ad altri si stringe come loro. */
    .jo-hd-board > .jo-hd-w--full { flex-grow: 3; }
    /* Mezza riga, decisa dai dati (Dashboard generale ▸ Strutture con qualcosa da fare fino a 5 hotel, owner 18-nov-2026). */
    .jo-hd-board > .jo-hd-w--half { flex-grow: 1; max-width: calc((100% - 16px) / 2); }
}

/* Si prende e si sposta da qualsiasi punto della card. */
.jo-hd-w[draggable="true"] { cursor: grab; }
.jo-hd-w[draggable="true"]:active { cursor: grabbing; }
.jo-hd-w a, .jo-hd-w button { cursor: pointer; }
.jo-hd-w-grip { cursor: grab; }

.jo-hd-w { display: flex; min-width: 0; }

/* Ogni riquadro si dispone secondo la SUA larghezza, non quella dello schermo
   (cliente 29-ott-2026): spostato accanto a un altro si stringe e passa a una
   colonna, da solo su una riga si allarga (@container jo-hd-w più sotto). */
.jo-hd-w { container: jo-hd-w / inline-size; }
.jo-hd-w > .jo-an-card { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.jo-hd-w > .jo-an-card > .jo-occ-legend { margin-top: auto; }
.jo-hd-w > .jo-an-card > .jo-occ-scroll { margin-bottom: 12px; }

/* Grafici che riempiono la card (owner 9-ott-2026: "niente spazi vuoti, i
 * grafici si adattano anche quando li sposti"): le card della stessa riga
 * restano alte uguali e il grafico si allunga fino al fondo della sua,
 * partendo dalla sua altezza di sempre (--aa-h, x-analytics.chart). Base 0:
 * è la riga a decidere l'altezza, non il grafico (niente giri di misure).
 * Lo stesso per lo stato vuoto, al centro dello spazio. Vale per Panoramica,
 * Dashboard Generale e Panoramica del chatbot (.jo-hd-board). */
.jo-hd-w > .jo-an-card > .aa-chart,
.jo-hd-w > .jo-an-card > * > .aa-chart:only-child {
    flex: 1 1 0;
    height: auto !important;
    min-height: var(--aa-h, 180px);
}
.jo-hd-w > .jo-an-card > .jo-an-empty { flex: 1 1 auto; justify-content: center; }

/* Strutture a confronto: grafico e tabella affiancati nella stessa card. */
.jo-hd-split { display: grid !important; gap: 20px; }

@container jo-hd-w (min-width: 640px) {
    .jo-hd-split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

.jo-hd-board-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: var(--ds-text-tertiary);
    font-size: 13px;
}

.jo-hd-board-empty > svg { width: 28px; height: 28px; color: var(--ds-text-placeholder); }

/* Carosello dei widget (hotel-dashboard/picker.blade.php): pannello fisso in
 * fondo allo schermo, a tutta larghezza, tessere in fila che scorrono in
 * orizzontale. Niente velo: la Panoramica sopra resta visibile e si aggiorna. */
.jo-wpick-dock {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    padding: 10px 20px 12px;
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-sidebar);
    box-shadow: 0 -8px 24px -8px rgba(20, 22, 40, .14);
}

.jo-wpick-in { transition: transform .2s ease, opacity .2s ease; }
.jo-wpick-from { transform: translateY(100%); opacity: 0; }
.jo-wpick-to { transform: translateY(0); opacity: 1; }

.jo-wpick-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.jo-wpick-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.jo-wpick-title b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary); }
.jo-wpick-count { font-size: 12.5px; color: var(--ds-text-tertiary); }
.jo-wpick-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.jo-wpick-nav .jo-icon-btn:disabled { opacity: .4; cursor: default; }

.jo-wpick-reset {
    margin-right: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ds-text-secondary);
}

.jo-wpick-reset:hover { background: var(--ds-surface-hover); color: var(--ds-text-primary); }

.jo-wpick-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 196px;
    gap: 10px;
    margin: 0;
    padding: 2px 2px 6px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

@media (max-width: 640px) {
    .jo-wpick-dock { padding: 12px 16px 14px; }
    .jo-wpick-reset { display: none; }
}

.jo-wpick-card {
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-surface);
    overflow: hidden;
    transition: border-color .12s ease;
}

.jo-wpick-card:hover { border-color: var(--ds-border-strong); }
.jo-wpick-card.is-on { border-color: var(--ds-step-current-bd); }

.jo-wpick-prev {
    position: relative;
    display: grid;
    place-items: center;
    height: 52px;
    padding: 8px 14px;
    background: var(--ds-surface-sunken);
    border-bottom: 1px solid var(--ds-row-divider);
}

.jo-wpick-prev svg { width: 100%; height: 100%; }
.jo-wpick-prev svg rect,
.jo-wpick-prev svg circle { fill: var(--ds-border); }
.jo-wpick-prev svg :is(rect, circle).on { fill: var(--ds-accent); opacity: .55; }
.jo-wpick-prev--dots svg circle:not(.on) { fill: none; stroke: var(--ds-border-strong); stroke-width: 1; }
.jo-wpick-prev svg polyline { stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.jo-wpick-prev svg polyline.on { stroke: var(--ds-accent); opacity: .7; }
.jo-wpick-prev svg polyline.alt { stroke: var(--ds-lime-strong); opacity: .7; }

.jo-wpick-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 8px 1px 6px;
    border: 1px solid var(--ds-step-done-bd);
    border-radius: 999px;
    background: var(--ds-step-done-bg);
    color: var(--ds-step-done-fg);
    font-size: 11.5px;
    font-weight: 500;
}

.jo-wpick-badge svg { width: 12px; height: 12px; }

.jo-wpick-body { flex: 1; padding: 8px 12px 2px; }
.jo-wpick-body b { display: block; font-size: 13px; font-weight: 600; color: var(--ds-text-primary); }
.jo-wpick-body p {
    display: -webkit-box;
    margin: 2px 0 0;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    color: var(--ds-text-tertiary);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.jo-wpick-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px 10px;
}

.jo-wpick-actions .jo-icon-btn:disabled { opacity: .35; cursor: default; }
.jo-wpick-cta { margin-left: auto; }

/* Nascondi un widget: occhio barrato nell'angolo, al passaggio sulla card
 * (sempre visibile su touch e da tastiera). Le azioni della testata della
 * card (Apri, frecce) si spostano per lasciargli posto. */
.jo-hd-w { position: relative; }

.jo-hd-w-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    gap: 2px;
    border-radius: 8px;
    background: var(--ds-surface);
    opacity: 0;
    transition: opacity .12s ease;
}

.jo-hd-w:hover .jo-hd-w-tools,
.jo-hd-w-tools:focus-within { opacity: 1; }

@media (hover: none) {
    .jo-hd-w-tools { opacity: 1; }
    .jo-hd-w-grip { display: none !important; }
}

.jo-hd-w-grip { cursor: grab; }
.jo-hd-w-grip:active { cursor: grabbing; }
html.jo-wpick-dragging .jo-hd-w-tools { opacity: 0; }

/* ── Riquadri nel colore del loro argomento (Elia 6-nov-2026) ─────────────
   «Più colore, deve essere più vivace»: torna la struttura di Giulia del
   29-ott (barra di 3px in cima, testata tinta), ma ogni riquadro nel colore
   del suo argomento invece che tutti viola (DashboardWidgets::tone:
   arancio da fare, verde soldi, indaco chat, blu email, verde acqua
   soggiorno, viola persone, grigio il contesto). Rivede «prima i dati, poi
   i contenitori» dello stesso giorno. Vale per le tre bacheche. */
.jo-hd-w {
    --jo-hd-head-bg: color-mix(in srgb, var(--jo-hd-cbg, var(--ds-accent-soft)) 70%, var(--ds-surface));
}

.jo-hd-w > .jo-an-card,
.jo-hd-w > .jo-panel { border-top: 3px solid var(--jo-hd-c, var(--ds-accent)); }

.jo-hd-w.jo-hd-w > .jo-an-card > h3:first-child,
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child,
.jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child,
.jo-hd-w > .jo-panel > .jo-ca-head:first-child {
    border-radius: max(0px, calc(var(--jo-ui-radius) - 3px)) max(0px, calc(var(--jo-ui-radius) - 3px)) 0 0;
    background: var(--jo-hd-head-bg);
}

.jo-hd-w > .jo-an-card > h3:first-child + .jo-an-card-hint,
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child + .jo-an-card-hint,
.jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child + .jo-an-card-hint,
.jo-hd-w > .jo-panel > .jo-ca-head:first-child + .jo-panel-hint {
    background: var(--jo-hd-head-bg);
}


/* Spostamento a comando (Elia 6-nov-2026): la maniglia c'è solo con «Sposta»
   acceso, e allora ogni riquadro ha il bordo tratteggiato e gli strumenti in
   vista; spento, la bacheca è ferma. */
html:not(.jo-hd-arranging) .jo-hd-w-grip { display: none; }
html.jo-hd-arranging .jo-hd-w-tools { opacity: 1; }
html.jo-hd-arranging .jo-hd-w > .jo-an-card,
html.jo-hd-arranging .jo-hd-w > .jo-panel { outline: 2px dashed var(--ds-auto-bd); outline-offset: 2px; }
html.jo-hd-arranging .jo-hd-w:hover > .jo-an-card,
html.jo-hd-arranging .jo-hd-w:hover > .jo-panel { outline-color: var(--ds-accent); }
html .jo-gd-head .jo-hd-arrange-btn.is-on { border-color: var(--ds-accent) !important; background: var(--ds-accent-soft) !important; color: var(--ds-accent-fg) !important; }
html .jo-gd-head .jo-hd-arrange-btn.is-on .fi-btn-icon { color: var(--ds-accent-fg) !important; }
.jo-hd-w.is-dragged > .jo-an-card { opacity: .4; outline: 2px dashed var(--ds-accent); outline-offset: -2px; }

.jo-hd-w > .jo-an-card > .jo-hd-card-h,
.jo-hd-w > .jo-an-card > h3 { padding-right: 64px; }
.jo-hd-w > .jo-hd-split > .jo-mtable-wrap { margin-top: 30px; }

/* Con il carosello aperto la Panoramica si può scorrere fino in fondo. */
html.jo-wpick-open .fi-main { padding-bottom: 230px; }

/* Velo sotto il carosello: il velo unico della piattaforma, quello chiaro delle sezioni
   aperte (--ds-focus-veil; owner 18-nov-2026, «preferisco il chiaro»: prima scuriva al 42%). */
.jo-wpick-veil {
    position: fixed;
    inset: 0;
    z-index: 38;
    background: var(--ds-focus-veil);
}

/* Lo stesso velo sotto i pop-up di conferma e avviso (Filament scuriva al 50%, 75% nel tema scuro). */
html .fi-modal-close-overlay { background-color: var(--ds-focus-veil) !important; }

/* Il velo entra coi token del movimento: decelerando (motion.css); esce più piano con .jo-veil-out. */
.jo-wpick-fade { transition: opacity var(--ds-motion-base) var(--ds-ease-out); }
.jo-wpick-fade-0 { opacity: 0; }
.jo-wpick-fade-1 { opacity: 1; }

/* Tessere da aggiungere: si trascinano nella pagina. */
.jo-wpick-card[draggable='true'] { cursor: grab; }
.jo-wpick-card[draggable='true']:active { cursor: grabbing; }
.jo-wpick-card.is-dragged { opacity: .45; border-style: dashed; }

/* Durante il trascinamento la Panoramica sale sopra il velo come zona di
 * rilascio; il widget sotto il cursore mostra dove andrà il nuovo (prima di lui). */
.jo-hd-board { position: relative; }

html.jo-wpick-dragging .jo-hd-board.is-drop {
    z-index: 39;
    border-radius: 14px;
    outline: 2px dashed var(--ds-accent);
    outline-offset: 8px;
}

.jo-hd-w.is-before::before,
.jo-hd-w.is-after::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 3px;
    border-radius: 3px;
    background: var(--ds-accent);
}

/* Lasciato sulla metà destra: va dopo, la linea sta a destra. */
.jo-hd-w.is-after::after { left: auto; right: -10px; }

.jo-hd-drop-hint {
    position: fixed;
    top: 84px;
    left: 50%;
    z-index: 41;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ds-accent);
    color: var(--ds-surface);
    font-size: 13px;
    font-weight: 500;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: var(--ds-shadow-raised);
}

.jo-hd-drop-hint > span { display: inline-flex; align-items: center; gap: 6px; }
.jo-hd-drop-hint svg { width: 16px; height: 16px; }

/* Il widget appena aggiunto, o quello a cui porta il link d'arrivo (Dashboard generale ▸
   Strutture con qualcosa da fare → «Oggi»), si illumina: sopra il velo, bordo e alone
   lilla; poi il risalto si spegne piano (owner 18-nov-2026, «scompare più delicatamente,
   quasi gradualmente»): bordo e alone sfumano e il riquadro resta sopra il velo finché il
   velo non è sparito (z-index da 39 ad «auto» è un salto: senza allow-discrete non
   aspetterebbe). Anche «Da completare», che in Panoramica è la striscia sopra la bacheca
   e non una card. Il bordo con .jo-hd davanti: «.jo-pano .jo-hd-w > .jo-an-card», più
   avanti nel file, lo copriva sulle card (18-nov-2026: si vedeva solo il piccolo scatto). */
.jo-hd-w { transition: z-index 0s linear calc(var(--ds-motion-slow) * 2) allow-discrete; }
.jo-hd .jo-hd-w > .jo-an-card { transition: box-shadow calc(var(--ds-motion-slow) * 2) var(--ds-ease-std); }
.jo-strip { transition: box-shadow calc(var(--ds-motion-slow) * 2) var(--ds-ease-std), z-index 0s linear calc(var(--ds-motion-slow) * 2); }

.jo-hd-w.is-glow,
.jo-strip.is-glow { z-index: 39; transition: none; }

.jo-hd .jo-hd-w.is-glow > .jo-an-card,
.jo-strip.is-glow {
    box-shadow: 0 0 0 2px var(--ds-accent), 0 14px 36px -8px rgba(124, 92, 203, .5);
    animation: jo-hd-glow 1.2s ease-out;
}

/* Un widget nascosto (occhio barrato, «Togli», la × di «Da completare») sfuma con lo stesso
   passo, poi se ne va (owner 18-nov-2026, «la scomparsa dei widget»; joWidgets.hide). */
.jo-hd-w.is-hiding,
.jo-strip.is-hiding { opacity: 0; pointer-events: none; transition: opacity calc(var(--ds-motion-slow) * 2) var(--ds-ease-std); }

/* I veli se ne vanno piano, con lo stesso passo del risalto (owner 18-nov-2026, «il modo in
   cui scompare mi piace»): il velo del carosello dei widget, quello della galleria nell'app,
   quello del link d'arrivo e la sua riga. */
.jo-veil-out { transition: opacity calc(var(--ds-motion-slow) * 2) var(--ds-ease-std); }

@keyframes jo-hd-glow {
    0% { transform: scale(.97); box-shadow: 0 0 0 0 var(--ds-accent), 0 0 0 0 rgba(124, 92, 203, 0); }
    40% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

/* Sul bordo alto del widget del link d'arrivo, di chi sono le cose da fare, come l'avviso di rilascio. */
.jo-hd-spot-t {
    position: absolute;
    top: -17px;
    left: 16px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ds-accent);
    color: var(--ds-surface);
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    box-shadow: var(--ds-shadow-raised);
}

.jo-hd-spot-t svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
    .jo-hd .jo-hd-w.is-glow > .jo-an-card,
    .jo-strip.is-glow { animation: none; }
    .jo-hd .jo-hd-w > .jo-an-card,
    .jo-strip,
    .jo-wpick-fade,
    .jo-veil-out,
    .jo-hd-w.is-hiding,
    .jo-strip.is-hiding { transition: none; }
}

/* Card Chatbot in Panoramica: titolo delle barre (owner 7-ott-2026). */
.jo-hd-out-title { margin: 14px 0 -4px; font-size: 12px; font-weight: 600; color: var(--ds-text-tertiary, #5B5B6B); }

/* Widget nascosto: "Annulla" per 5 secondi, la barra si accorcia (HasWidgetBoard::removeWidget). */
.jo-undo-bar {
    display: block;
    height: 3px;
    margin-top: 8px;
    border-radius: 999px;
    background: var(--ds-accent, #7C5CCB);
    transform-origin: left center;
    animation: jo-undo-countdown 5s linear forwards;
}
.fi-no-notification:hover .jo-undo-bar { animation-play-state: paused; }
@keyframes jo-undo-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Provenienza delle prenotazioni (Panoramica, owner 9-ott-2026): una riga per
   canale col logo, la barra, il numero e la percentuale. */
.jo-bks { display: grid; flex: 1; align-content: center; gap: 10px; margin-top: 12px; }
.jo-bks-row { display: grid; grid-template-columns: 24px minmax(0, 9rem) 1fr auto 3rem; align-items: center; gap: 10px; font-size: 13px; }
.jo-bks-logo { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-tertiary, #5B5B6B); }
.jo-bks-logo svg { width: 15px; height: 15px; }
.jo-bks-logo.is-brand { background: none; }
.jo-bks-logo.is-brand svg { width: 22px; height: 22px; }
.jo-bks-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text-secondary, #3F3F46); }
.jo-bks-bar { height: 8px; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); overflow: hidden; }
.jo-bks-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ds-accent, #7C5CCB); opacity: .75; }
.jo-bks-n { font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); }
.jo-bks-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--ds-text-tertiary, #5B5B6B); }

/* ── Piano e moduli, revisione 19-ott-2026 ────────────────────────
 * Sul telefono una riga per modulo: icona, nome e pallino dello stato (il
 * nome dello stato nel tooltip), la data o la richiesta solo se ci sono;
 * niente descrizione né switch Lista | Card (si resta in Lista). */
@media (max-width: 639px) {
    .jo-plan-bar { display: none; }

    .jo-plan .jo-plan-row,
    .jo-plan.jo-plan--cards .jo-plan-row {
        grid-template-columns: 28px minmax(0, 1fr) auto auto;
        grid-template-rows: none;
        align-items: center;
        row-gap: 2px;
        column-gap: 10px;
        min-height: 48px;
        padding: 8px 12px;
        border: 0;
        border-radius: 0;
    }

    .jo-plan.jo-plan--cards .jo-plan-list { display: block; padding: 0; }
    .jo-plan.jo-plan--cards .jo-plan-row + .jo-plan-row { border-top: 1px solid var(--ds-row-divider); }

    .jo-plan .jo-plan-ic { width: 28px; height: 28px; }
    .jo-plan .jo-plan-name span { display: none; }

    .jo-plan .jo-plan-row > .jo-cell-status { grid-column: 3; grid-row: 1; }
    .jo-plan .jo-plan-row > .jo-plan-actions { grid-column: 4; grid-row: 1; }
    .jo-plan .jo-plan-row > .jo-plan-detail { grid-column: 2 / -1; grid-row: 2; margin: 0; font-size: 12px; color: var(--ds-text-tertiary); }
    .jo-plan .jo-plan-row > .jo-plan-detail--quiet { display: none; }
    .jo-plan .jo-plan-actions:empty { display: none; }

    .jo-plan .jo-plan-state {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* ── Panoramica, revisione 19-ott-2026 ────────────────────────────
 * - Provenienza delle prenotazioni: le righe partono dall'alto, non
 *   centrate nella card (lasciavano ~90px vuoti sopra e sotto).
 * - Campagne: senza campagne nel periodo il messaggio sta al centro dello
 *   spazio che resta, invece di lasciare mezza card vuota sotto.
 * - Strumenti del widget (sposta, nascondi) uguali su ogni card: la card
 *   tiene il suo contenuto (grafici, tabelle, tooltip) sotto di loro, così
 *   compaiono sempre al passaggio e restano visibili su touch. */
.jo-bks { align-content: start; }

.jo-hd-w > .jo-an-card { isolation: isolate; }
.jo-hd-w-tools { z-index: 3; }

/* Attività recenti senza righe: la frase al centro della card. */
.jo-hd-timeline > li.jo-hd-none { display: block; padding: 9px 0; }
.jo-hd-w > .jo-an-card > .jo-hd-timeline:has(> .jo-hd-none:only-child) {
    display: grid;
    flex: 1;
    place-items: center;
    text-align: center;
}
/* Oggi (19-ott-2026, Agenda per ruolo; D2 9-nov-2026 con x-jo.urgency-list):
 * l'ora dello snapshot nel sottotitolo; niente da fare = segno verde e una
 * frase. Il pallino urgente resta per la Dashboard generale e Seleziona un hotel. */
.jo-today-at { color: var(--jo-ui-muted); font-weight: 400; }
.jo-today-urgent {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--ds-warn-dot, #D9A048);
    vertical-align: 1px;
}
.jo-today-empty { display: flex; align-items: center; gap: 12px; padding: 8px 0 4px; }
.jo-today-empty .jo-kpi-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; }
.jo-today-empty .jo-kpi-ic svg { width: 20px; height: 20px; }
.jo-today-empty b { display: block; font-size: 14px; font-weight: 600; color: var(--jo-ui-ink); }
.jo-today-empty small { display: block; font-size: 12px; color: var(--jo-ui-muted); }

/* Seleziona un hotel ▸ "Le tue strutture oggi" (partner, 19-ott-2026). */
.jo-selhotel-agenda { margin: 0 0 14px; padding: 0 0 10px; border-bottom: 1px solid var(--jo-ui-line-2); }
.jo-selhotel-agenda-h { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--jo-ui-muted); }
.jo-selhotel-agenda ul { margin: 0; padding: 0; list-style: none; }
.jo-selhotel-agenda .jo-kpi-ic { display: inline-flex; width: 28px; height: 28px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 8px; }
.jo-selhotel-agenda-go { font-size: 12.5px; font-weight: 500; color: var(--jo-primary-600, #7C5CCB); white-space: nowrap; }

/* ── Bacheche: prima i dati, poi i contenitori (cliente 6-nov-2026) ───────
   Panoramica e Dashboard generale (.jo-hd). Rivede «Bacheche d'impatto»
   (29-ott-2026): la barra viola in alto e la testata lilla pesavano più dei
   numeri. KPI con i token di ui-standard.css (28px, il principale 40px),
   contatori di "Oggi" e "Da vedere" 24px, totali sopra i grafici come i KPI.
   Stessi blocchi, stesso ordine. Barra e testata sono poi tornate, nel
   colore dell'argomento di ogni riquadro (Elia 6-nov-2026, «Riquadri nel
   colore del loro argomento» più su). */
.jo-hd {
    --jo-kpi-note: var(--ds-kpi-note, 12.5px);
}

/* Nelle righe (Oggi, Da vedere…) l'icona è larga quanto la sua colonna di
   28px: la regola generale dei KPI la allargava sopra il titolo. */
.jo-hd-link { --jo-kpi-icon: 28px; --jo-kpi-icon-svg: 15px; }

.jo-hd .jo-kpi-val,
.jo-hd .jo-an-sum-v { letter-spacing: -0.02em; line-height: 1.1 !important; }

.jo-hd .jo-hd-link-v { font-size: 24px; letter-spacing: -0.01em; }
.jo-hd .jo-hd-stats dd { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.jo-hd .jo-bks-n { font-size: 15px; }

/* Riquadri delle bacheche tutti uguali (Panoramica, Dashboard generale,
   bacheca del Chatbot): testata sul fondo della card, titolo forte, icona
   del widget e un filetto sotto; niente fasce colorate. */
/* Tre selettori, non :is() come soggetto (PanelCssSelectorsTest); h3 con la
   classe ripetuta per la stessa forza delle altre due. */
.jo-hd-w.jo-hd-w > .jo-an-card > h3:first-child,
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child,
.jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child {
    margin: -14px -16px 12px !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--ds-row-divider, var(--ds-border)) !important;
}

.jo-hd-w .jo-an-card h3:first-of-type { font-size: var(--ds-fs-h3); font-weight: 700; }

/* Titolo e sottotitolo, tutti e due nella testata, in ogni riquadro (cliente
   29-ott-2026): il sottotitolo su una riga, così le testate sono alte uguali. */
.jo-hd-w.jo-hd-w > .jo-an-card > h3:first-child:has(+ .jo-an-card-hint),
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child:has(+ .jo-an-card-hint),
.jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child:has(+ .jo-an-card-hint) {
    margin-bottom: 0 !important;
    padding-bottom: 2px !important;
    border-bottom: 0 !important;
}

.jo-hd-w > .jo-an-card > :is(h3, .jo-hd-card-h, .jo-gd-card-h):first-child + .jo-an-card-hint {
    margin: 0 -16px 12px !important;
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--ds-row-divider, var(--ds-border));
}

.jo-hd-w > .jo-an-card > :is(h3, .jo-hd-card-h, .jo-gd-card-h):first-child + .jo-an-card-hint,
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child .jo-an-card-hint {
    overflow: hidden;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Testata con il sottotitolo dentro (Oggi, Da completare): stesso spazio sotto. */
.jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child:has(.jo-an-card-hint) { padding-bottom: 10px !important; }

/* Titolo semplice (senza riga titolo): l'icona dentro la testata, non sull'angolo;
   l'icona (::before) sul suo tassello bianco (::after), come in design-system.css
   (Dashboard generale, #549). Nel D2 (.jo-pano) valgono le regole più sotto. */
html .jo-hd-w[style*="--jo-hd-ic"] > .jo-an-card > h3:first-child { padding-left: 54px !important; }
html .jo-hd-w[style*="--jo-hd-ic"] > .jo-an-card > h3:first-child::before { top: calc(12px + (1lh - 16px) / 2); left: 22px; }
html .jo-hd-w[style*="--jo-hd-ic"] > .jo-an-card > h3:first-child::after { top: calc(12px + (1lh - 28px) / 2); left: 16px; }

.jo-hd .jo-hd-stats dt { font-weight: 600; }

/* ── Panoramiche D2 «Il periodo in testa» (owner 9-nov-2026) ─────────────
 * Il disegno scelto per la Panoramica dell'hotel e, dopo, per Chatbot e
 * Performance: card leggere (.jo-pano: niente barra viola né testata lilla,
 * titolo e sottotitolo sulla card), KPI con la linea (x-jo.kpi-spark),
 * barra d'urgenza con la lista (x-jo.urgency-list), imbuto a gradini
 * (x-jo.step-funnel), barra a fette (x-jo.split-bar), barre orizzontali
 * (x-jo.bar-list), striscia di avanzamento (.jo-strip) e barra «Aggiungi un
 * widget» (x-jo.add-widgets). Solo token --ds-*: il tema scuro li segue. */

/* Card leggere: bordo, angoli da 16px, ombra a riposo; titolo forte e la riga
   grigia sotto, sulla card. Vincono sulle «Bacheche d'impatto» (sopra). */
.jo-hd.jo-pano { gap: 20px; }

.jo-pano .jo-hd-w > .jo-an-card,
.jo-pano > .jo-an-card {
    padding: 18px 20px 18px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-rest);
}

.jo-hd.jo-pano .jo-hd-w.jo-hd-w > .jo-an-card > h3:first-child,
.jo-hd.jo-pano .jo-hd-w.jo-hd-w > .jo-an-card > h3:first-child:has(+ .jo-an-card-hint) {
    margin: 0 !important;
    padding: 0 64px 0 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none;
}

.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child,
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child:has(.jo-an-card-hint) {
    align-items: flex-start;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none;
}

.jo-hd.jo-pano .jo-hd-w .jo-an-card h3:first-of-type {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.35;
    color: var(--ds-text-primary);
}

/* Titolo col chip dell'argomento (owner 9-nov-2026: «titoli e sottotitoli
   non si distinguono», riferimento Atrium): a sinistra un quadratino tinto
   (::before) con l'icona del widget nel colore dell'argomento (::after),
   come il chip dei KPI. L'argomento lo dichiara la Panoramica
   (jo-hd-w--t-{argomento}); senza, il viola dei grafici. */
.jo-hd.jo-pano .jo-hd-w { --jo-hd-tc: var(--ds-chart-1, var(--ds-accent)); }
.jo-hd.jo-pano .jo-hd-w--t-people { --jo-hd-tc: var(--ds-chart-people, var(--ds-accent)); }
.jo-hd.jo-pano .jo-hd-w--t-email { --jo-hd-tc: var(--ds-chart-email, var(--ds-brand-email)); }
.jo-hd.jo-pano .jo-hd-w--t-whatsapp { --jo-hd-tc: var(--ds-chart-whatsapp, var(--ds-brand-whatsapp)); }
.jo-hd.jo-pano .jo-hd-w--t-ai { --jo-hd-tc: var(--ds-chart-ai, var(--ds-tone-ai-fg)); }
.jo-hd.jo-pano .jo-hd-w--t-money { --jo-hd-tc: var(--ds-chart-money, var(--ds-ok-dot)); }
.jo-hd.jo-pano .jo-hd-w--t-todo { --jo-hd-tc: var(--ds-chart-todo, var(--ds-warn-dot)); }

html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type {
    position: relative;
    min-height: 32px;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    padding-left: 42px !important;
    line-height: 1.4;
}
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::before,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
}
/* Tassello sotto, icona sopra: design-system.css (sezione 7, Dashboard
   generale) mette l'icona in ::before e il tassello in ::after, con gli
   strati al contrario; qui gli strati si dichiarano, se no il tassello
   copriva l'icona (merge del 9-nov-2026). */
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::before {
    z-index: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--jo-hd-tc) 14%, var(--ds-surface));
    -webkit-mask: none;
    mask: none;
}
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::after {
    z-index: 1;
    top: 7px;
    left: 7px;
    width: 18px;
    height: 18px;
    border-radius: 0;
    box-shadow: none;
    background: var(--jo-hd-tc);
    -webkit-mask: var(--jo-hd-ic) center / contain no-repeat;
    mask: var(--jo-hd-ic) center / contain no-repeat;
}
/* Il sottotitolo sotto il titolo, allineato al testo e non al chip. */
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type + .jo-an-card-hint,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card .jo-hd-card-h:has(> div > h3:first-child) .jo-an-card-hint { padding-left: 42px !important; margin-top: -2px !important; }
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card .jo-gd-card-h:has(> div > h3:first-child) .jo-an-card-hint,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card > .jo-hd-card-h:first-child + .jo-an-card-hint { padding-left: 42px !important; margin-top: -2px !important; }

.jo-hd.jo-pano .jo-hd-w > .jo-an-card > h3:first-child + .jo-an-card-hint,
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h .jo-an-card-hint {
    margin: 3px 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-size: 12.5px;
    line-height: 18px;
    color: var(--ds-text-tertiary);
}

.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h .jo-an-card-hint { margin-bottom: 0 !important; }

/* Dashboard generale (owner 10-nov-2026, D2 come la Panoramica): le sue
   testate .jo-gd-card-h e il sottotitolo che segue una testata .jo-hd-card-h
   (Ospiti per hotel) senza la fascia lilla, come gli altri riquadri. */
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child,
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child:has(+ .jo-an-card-hint) {
    align-items: flex-start;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: none;
}
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child + .jo-an-card-hint,
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-gd-card-h:first-child + .jo-an-card-hint,
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-gd-card-h .jo-an-card-hint {
    margin: 3px 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-size: 12.5px;
    line-height: 18px;
    color: var(--ds-text-tertiary);
}
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-gd-card-h .jo-an-card-hint { margin-bottom: 0 !important; }
.jo-hd.jo-pano .jo-hd-w > .jo-an-card > .jo-hd-card-h:first-child:has(+ .jo-an-card-hint) { margin-bottom: 0 !important; }
.jo-hd.jo-pano .jo-hd-w .jo-hd-card-h .jo-hd-card-link { margin-top: -4px; margin-bottom: -4px; }

/* KPI del periodo: quattro su una riga dal computer, due sotto i 1100px. */
.jo-hd.jo-pano > .jo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (min-width: 1100px) {
    .jo-hd.jo-pano > .jo-kpis.jo-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    /* Dashboard generale: cinque KPI su una riga (owner 10-nov-2026, D2 come la Panoramica). */
    .jo-hd.jo-pano > .jo-kpis.jo-kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    /* Sei KPI (la sesta tessera, Ricavi dal chatbot): tre per riga, larghe
       come le tessere della Panoramica (owner 10-nov-2026, «coerenza
       grafica»); su due colonne erano larghe il doppio e mezze vuote. */
    .jo-hd.jo-pano > .jo-kpis.jo-kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* KPI con la linea: l'icona resta accanto a etichetta e valore, la linea
   corre sotto tutta la tessera, nel colore dello stato. Le righe si
   distribuiscono come nelle altre tessere (ui-standard.css): in una fila più
   alta il vuoto non resta tutto sotto (owner 10-nov-2026). */
.jo-hd .jo-kpi.jo-kpi--spark { align-content: space-between; }
.jo-hd .jo-kpi.jo-kpi--spark.has-spark { padding-bottom: 8px !important; }
.jo-kpi.jo-kpi--spark > .jo-kpi-top > .jo-kpi-ic { top: 14px; transform: none; }

.jo-kpi--spark > .jo-spark {
    display: block;
    flex: 0 0 auto;
    width: calc(100% + var(--jo-kpi-icon) + 8px);
    height: 34px;
    margin: 8px 0 0 calc(-1 * (var(--jo-kpi-icon) + 8px));
    overflow: visible;
}

/* La linea prende il colore dell'argomento, lo stesso del chip del KPI
   (owner 9-nov-2026, «grafici con un po' di colore»: token --ds-chart-* in
   joorna-tokens.css, gli stessi di ChartPalette): lilla persone, blu email,
   verde WhatsApp, viola-blu AI, verde soldi, arancio da fare; rosso problema. */
.jo-spark { --jo-spark-c: var(--ds-chart-1, var(--ds-accent)); }
.jo-spark--people { --jo-spark-c: var(--ds-chart-people, var(--ds-accent)); }
.jo-spark--email { --jo-spark-c: var(--ds-chart-email, var(--ds-brand-email)); }
.jo-spark--whatsapp { --jo-spark-c: var(--ds-chart-whatsapp, var(--ds-brand-whatsapp)); }
.jo-spark--ai { --jo-spark-c: var(--ds-chart-ai, var(--ds-tone-ai-fg)); }
.jo-spark--money { --jo-spark-c: var(--ds-chart-money, var(--ds-ok-dot)); }
.jo-spark--todo { --jo-spark-c: var(--ds-chart-todo, var(--ds-warn-dot)); }
.jo-spark--danger { --jo-spark-c: var(--ds-err-dot); }
.jo-spark-line { fill: none; stroke: var(--jo-spark-c); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.jo-spark-area { fill: color-mix(in srgb, var(--jo-spark-c) 18%, transparent); stroke: none; }
/* Area sfumata dal colore al trasparente (owner 9-nov-2026, riferimento Atrium). */
.jo-spark-g0 { stop-color: var(--jo-spark-c); stop-opacity: .4; }
.jo-spark-g1 { stop-color: var(--jo-spark-c); stop-opacity: 0; }
/* Tutti zeri: una linea piatta tenue, nel colore dell'argomento. */
.jo-spark.is-flat .jo-spark-line { stroke-width: 2; opacity: .35; }

/* A zero (ui-standard.js) i toni di stato tornano neutri, linea compresa: un
   arancio o un verde a zero non dicono niente (owner 8-ott-2026). I toni
   dell'argomento (persone, email, WhatsApp, AI) restano colorati anche a
   zero (owner 9-nov-2026, «grafici più carichi»): dicono di cosa parla la
   tessera, non come va. */
.jo-kpi--spark:has(> .jo-kpi-top > .jo-kpi-ic.is-zero:is(.jo-tone-todo, .jo-tone-money, .jo-tone-danger, .jo-tone-neutral)) > .jo-spark .jo-spark-line { stroke: var(--ds-border-strong); opacity: 1; }
.jo-kpi--spark:has(> .jo-kpi-top > .jo-kpi-ic.is-zero:is(.jo-tone-todo, .jo-tone-money, .jo-tone-danger, .jo-tone-neutral)) > .jo-spark .jo-spark-area { fill: var(--ds-surface-sunken) !important; opacity: 1; }
html .jo-kpi--spark .jo-kpi-ic.is-zero.jo-tone-people { background: var(--ds-tone-people-bg) !important; color: var(--ds-tone-people-fg) !important; }
html .jo-kpi--spark .jo-kpi-ic.is-zero.jo-tone-email { background: var(--ds-tone-email-bg) !important; color: var(--ds-tone-email-fg) !important; }
html .jo-kpi--spark .jo-kpi-ic.is-zero.jo-tone-whatsapp { background: var(--ds-tone-whatsapp-bg) !important; color: var(--ds-tone-whatsapp-fg) !important; }
html .jo-kpi--spark .jo-kpi-ic.is-zero.jo-tone-ai { background: var(--ds-tone-ai-bg) !important; color: var(--ds-tone-ai-fg) !important; }

/* La nota sempre su una riga sua sotto il valore, intera e senza puntini (come
   «403 of 420 doors» di Atrium): accanto al valore si tagliava fino a non dire
   niente («2 min a doma…»). */
.jo-kpi.jo-kpi--spark > .jo-kpi-note { flex-basis: 100%; min-width: 0; overflow: visible !important; text-overflow: clip !important; white-space: normal !important; }

/* Il piccolo grafico a destra del valore (owner 9-nov-2026, come Atrium):
   dal computer sta in una casella fissa a destra, centrata in altezza, e la
   tessera torna bassa; anello per le percentuali, barrette per i soldi,
   linea per il resto (x-jo.kpi-spark). Sul telefono la linea resta sotto. */
@media (min-width: 641px) {
    /* Il grafico sta all'altezza del valore, a destra: l'etichetta sopra e la
       nota sotto restano larghe quanto la tessera (la nota andava a capo a
       ogni parola, «▲333% vs / prima»). */
    .jo-kpi.jo-kpi--spark.has-spark { position: relative; }
    .jo-hd .jo-kpi.jo-kpi--spark.has-spark,
    .fi-page.jo-pano .jo-kpi.jo-kpi--spark.has-spark { padding-bottom: 14px !important; }
    /* Centrato in altezza, all'altezza del valore anche quando la tessera
       si allunga; nelle tessere strette più corto, così non passa sopra
       l'etichetta (owner 10-nov-2026). */
    .jo-kpi--spark > .jo-spark {
        position: absolute;
        top: 50%;
        right: 16px;
        width: min(88px, 34%);
        height: 30px;
        margin: 0;
        transform: translateY(-50%);
    }
    .jo-kpi--spark > .jo-spark.jo-spark-ring { right: 20px; width: 40px; height: 40px; }
    .jo-kpi--spark > .jo-spark.jo-spark-bars { right: 18px; width: min(76px, 30%); height: 28px; }
    /* Cinque KPI su una riga (Dashboard generale): la tessera è stretta e
       bassa, il grafico sta in alto a destra accanto all'etichetta. */
    .jo-kpis--5 .jo-kpi--spark > .jo-spark { top: 12px; width: 64px; height: 24px; transform: none; }
    .jo-kpis--5 .jo-kpi--spark > .jo-spark.jo-spark-ring { top: 10px; width: 32px; height: 32px; }
}
@media (max-width: 640px) {
    .jo-kpi--spark > .jo-spark-ring,
    .jo-kpi--spark > .jo-spark-bars { display: none; }
}
.jo-ring-track { fill: none; stroke: color-mix(in srgb, var(--jo-spark-c) 16%, transparent); stroke-width: 5; }
.jo-ring-fill { fill: none; stroke: var(--jo-spark-c); stroke-width: 5; stroke-linecap: round; }
.jo-spark-bars rect { fill: color-mix(in srgb, var(--jo-spark-c) 55%, transparent); }
.jo-spark-bars rect.is-last { fill: var(--jo-spark-c); }
.jo-kpi--spark:has(> .jo-kpi-top > .jo-kpi-ic.is-zero:is(.jo-tone-todo, .jo-tone-money, .jo-tone-danger, .jo-tone-neutral)) > .jo-spark { --jo-spark-c: var(--ds-border-strong); }

/* Strumenti dei widget solo con «Sposta» acceso (segnalazione ClickUp
   9-nov-2026: «fuori modifica i widget non si prendono e le loro maniglie
   non ci sono»; bordo tratteggiato e maniglia più su, «Spostamento a comando»). */
html:not(.jo-hd-arranging) .jo-hd .jo-hd-w-tools { display: none !important; }
html:not(.jo-hd-arranging) .jo-hd .jo-hd-w[draggable="true"] { cursor: auto; }

/* Striscia «Da completare» (segnalazione ClickUp 9-nov-2026: «sticky,
   chiudibili, con carosello»): ferma in cima sotto la barra in alto mentre si
   scorre; in testa titolo, conteggio, barra, frecce e X; sotto i passi in
   fila, card che scorrono di lato a scatti (scroll-snap), senza barra di
   scorrimento. */
.jo-strip {
    position: sticky;
    top: calc(var(--jo-topbar-h, 64px) + 8px);
    z-index: 12;
    padding: 10px 12px 12px 16px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-rest), 0 -8px 0 var(--ds-bg-app);
}

.jo-strip-row { display: flex; align-items: center; gap: 6px 14px; min-width: 0; }
.jo-strip-t { font-size: 13.5px; font-weight: 600; color: var(--ds-text-primary); white-space: nowrap; }
.jo-strip-n { font-size: 12.5px; color: var(--ds-text-tertiary); white-space: nowrap; }
.jo-strip-bar { flex: 1 1 120px; height: 6px; min-width: 80px; overflow: hidden; border-radius: 999px; background: var(--ds-surface-sunken); }
.jo-strip-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ds-lime-strong); }
.jo-strip-arrows { display: inline-flex; gap: 2px; }
.jo-strip-arrows .jo-icon-btn[disabled] { opacity: .35; cursor: default; }
.jo-strip-hide { margin-left: 4px; }

.jo-strip-track {
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.jo-strip-track::-webkit-scrollbar { display: none; }
.jo-strip-track > li { flex: 0 0 auto; scroll-snap-align: start; }

.jo-strip-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 340px;
    max-width: 78vw;
    min-height: 44px;
    box-sizing: border-box;
    padding: 8px 12px 8px 8px;
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    background: var(--ds-bg-app);
    font-size: 13px;
    color: var(--ds-text-secondary);
}
a.jo-strip-card:hover { border-color: var(--ds-accent-soft-border, var(--ds-border-strong)); background: var(--ds-accent-soft); }
.jo-strip-card-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ds-surface); color: var(--ds-text-tertiary); }
.jo-strip-card-ic svg { width: 16px; height: 16px; }
.jo-strip-card-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-strip-card b { flex: none; font-weight: 600; color: var(--ds-text-link); white-space: nowrap; }

/* Barra d'urgenza con la lista (Oggi). */
.jo-urg { display: flex; flex-direction: column; min-width: 0; }
.jo-urg-bar { display: flex; gap: 2px; height: 8px; margin: 2px 0 8px; overflow: hidden; border-radius: 999px; }
.jo-urg-seg { flex: 1 1 0; min-width: 6px; }
.jo-urg-seg.jo-urg--danger, .jo-urg-dot.jo-urg--danger { background: var(--ds-err-dot); }
.jo-urg-seg.jo-urg--warning, .jo-urg-dot.jo-urg--warning { background: var(--ds-warn-dot); }
.jo-urg-seg.jo-urg--neutral, .jo-urg-dot.jo-urg--neutral { background: var(--ds-border-strong); }

.jo-urg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 6px; font-size: 12.5px; color: var(--ds-text-tertiary); }
.jo-urg-n { font-weight: 700; }
.jo-urg-n.jo-urg--danger { color: var(--ds-err-fg); }
.jo-urg-n.jo-urg--warning { color: var(--ds-warn-fg); }
.jo-urg-n.jo-urg--neutral { color: var(--ds-text-secondary); }

.jo-urg-list { margin: 0; padding: 0; list-style: none; }
.jo-urg-list > li + li { border-top: 1px solid var(--ds-row-divider); }

.jo-urg-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 8px;
    color: var(--ds-text-primary);
    transition: background-color .12s ease;
}

a.jo-urg-row:hover { background: var(--ds-accent-soft); }
a.jo-urg-row:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }
.jo-urg-dot { flex: none; width: 10px; height: 10px; border-radius: 999px; }
.jo-urg-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.jo-urg-txt b { font-weight: 650; }
.jo-urg-count { flex: none; font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.jo-urg-go { flex: none; width: 16px; height: 16px; color: var(--ds-text-tertiary); }

/* Un widget Oggi largo (da solo sulla riga): le voci su due colonne. */
@container jo-hd-w (min-width: 640px) {
    .jo-urg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
    .jo-urg-list > li:nth-child(2) { border-top: 0; }
}

/* Imbuto a barre orizzontali (x-jo.step-funnel; cliente 13-nov-2026: i «tubetti»
   del 9-nov non piacciono). Una riga per passo, sulle stesse colonne: il nome,
   la barra lunga quanto il numero sul passo più grande (--jo-fill), il numero e
   la nota corta («47%»). Barre nel colore dell'argomento, il risultato più
   scuro, i soldi in verde, a zero solo il binario. */
.jo-stairs {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(72px, 1fr) max-content minmax(0, max-content);
    align-items: center;
    gap: 12px 14px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.jo-stairs-i { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-width: 0; }
.jo-stairs-l { overflow: hidden; max-width: 180px; font-size: 13px; color: var(--ds-text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.jo-stairs-bar {
    position: relative;
    display: block;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--jo-stairs-c, var(--ds-accent)) 12%, var(--ds-surface));
}
.jo-stairs-bar > i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--jo-fill, 0%);
    border-radius: 999px;
    background: var(--jo-stairs-c, var(--ds-accent));
    transition: width var(--ds-motion-slow, .3s) var(--ds-ease-out, ease-out);
}
.jo-stairs-i:last-child:not(.is-zero):not(.is-money) .jo-stairs-bar > i {
    background: color-mix(in srgb, var(--jo-stairs-c, var(--ds-accent)) 80%, var(--ds-text-primary));
}
.jo-stairs-i.is-money .jo-stairs-bar > i { background: var(--ds-chart-money, var(--ds-ok-dot)); }
.jo-stairs-v { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.jo-stairs-note { overflow: hidden; font-size: 12px; color: var(--ds-text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.jo-stairs-i.is-money .jo-stairs-v { color: var(--ds-ok-fg); }
.jo-stairs-i.is-zero .jo-stairs-v { color: var(--ds-text-tertiary); }

/* Le barre col colore dell'argomento dell'imbuto (topic del componente). */
.jo-stairs--people { --jo-stairs-c: var(--ds-chart-people, var(--ds-accent)); }
.jo-stairs--email { --jo-stairs-c: var(--ds-chart-email, var(--ds-brand-email)); }
.jo-stairs--whatsapp { --jo-stairs-c: var(--ds-chart-whatsapp, var(--ds-brand-whatsapp)); }
.jo-stairs--ai { --jo-stairs-c: var(--ds-chart-ai, var(--ds-tone-ai-fg)); }

/* Barra a fette con la legenda (Da dove prenotano, Come finiscono le chat). */
.jo-slices { min-width: 0; }
.jo-slices-bar { display: flex; gap: 3px; height: 16px; margin: 4px 0 12px; overflow: hidden; border-radius: 999px; }
.jo-slices-s { flex: 1 1 0; min-width: 4px; }
/* Fette in tinte diverse, nell'ordine della sequenza dei grafici (owner
   9-nov-2026: viola, lime, blu, ambra, verde, rosa; --ds-chart-1…6). */
.jo-slices-c1 { background: var(--ds-chart-1, var(--ds-accent)); }
.jo-slices-c2 { background: var(--ds-chart-2, var(--ds-lime-strong)); }
.jo-slices-c3 { background: var(--ds-chart-3, var(--ds-info-dot)); }
.jo-slices-c4 { background: var(--ds-chart-4, var(--ds-warn-dot)); }
.jo-slices-c5 { background: var(--ds-chart-5, var(--ds-ok-dot)); }
.jo-slices-c6 { background: var(--ds-chart-6, var(--ds-err-dot)); }
.jo-slices-s.is-other,
.jo-slices-legend i.is-other { background: var(--ds-border-strong); }

/* Ciambella (x-jo.split-bar ring, owner 9-nov-2026, come Atrium): l'anello a
   fette staccate coi colori della sequenza, al centro la quota più grande,
   accanto la legenda con numero e quota allineati a destra. */
.jo-slices--ring { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.jo-donut { position: relative; flex: none; width: 148px; height: 148px; }
.jo-donut svg { display: block; width: 100%; height: 100%; overflow: visible; }
.jo-donut-track { fill: none; stroke: var(--ds-surface-sunken); stroke-width: 14; }
/* Le fette sono pezzi pieni con gli angoli appena smussati e una fessura sottile
   (owner 17-nov-2026, versione D; x-jo.split-bar): il colore riempie il pezzo e, al
   passaggio, un bordo dello stesso colore lo ingrossa. Una voce sola è l'anello intero. */
.jo-donut-s { --jo-donut-c: var(--ds-border-strong); fill: var(--jo-donut-c); stroke: var(--jo-donut-c); stroke-width: 0; stroke-linejoin: round; transition: stroke-width .15s ease; }
.jo-donut-s:hover { stroke-width: 3; }
.jo-donut-s.is-full { fill: none; stroke-width: 14; }
.jo-donut-s.is-full:hover { stroke-width: 18; }
.jo-donut-s.jo-slices-c1 { --jo-donut-c: var(--ds-chart-1, var(--ds-accent)); }
.jo-donut-s.jo-slices-c2 { --jo-donut-c: var(--ds-chart-2, var(--ds-lime-strong)); }
.jo-donut-s.jo-slices-c3 { --jo-donut-c: var(--ds-chart-3, var(--ds-info-dot)); }
.jo-donut-s.jo-slices-c4 { --jo-donut-c: var(--ds-chart-4, var(--ds-warn-dot)); }
.jo-donut-s.jo-slices-c5 { --jo-donut-c: var(--ds-chart-5, var(--ds-ok-dot)); }
.jo-donut-s.jo-slices-c6 { --jo-donut-c: var(--ds-chart-6, var(--ds-err-dot)); }
.jo-donut-s.is-other { --jo-donut-c: var(--ds-border-strong); }
.jo-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; pointer-events: none; text-align: center; }
.jo-donut-c b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ds-text-primary); font-variant-numeric: tabular-nums; }
/* Il nome della fetta al centro su due righe al massimo (alcuni sono frasi). */
.jo-donut-c small { display: -webkit-box; max-width: 96px; overflow: hidden; font-size: 11.5px; line-height: 1.3; color: var(--ds-text-tertiary); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.jo-donut-legend { display: grid; flex: 1 1 160px; gap: 2px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.jo-donut-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3rem; align-items: center; gap: 8px; min-height: 30px; border-top: 1px solid var(--ds-border); font-size: 13.5px; }
.jo-donut-legend li:first-child { border-top: 0; }
.jo-donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.jo-donut-legend i.jo-slices-c1 { background: var(--ds-chart-1, var(--ds-accent)); }
.jo-donut-legend i.jo-slices-c2 { background: var(--ds-chart-2, var(--ds-lime-strong)); }
.jo-donut-legend i.jo-slices-c3 { background: var(--ds-chart-3, var(--ds-info-dot)); }
.jo-donut-legend i.jo-slices-c4 { background: var(--ds-chart-4, var(--ds-warn-dot)); }
.jo-donut-legend i.jo-slices-c5 { background: var(--ds-chart-5, var(--ds-ok-dot)); }
.jo-donut-legend i.jo-slices-c6 { background: var(--ds-chart-6, var(--ds-err-dot)); }
.jo-donut-legend i.is-other { background: var(--ds-border-strong); }
/* La voce della legenda va a capo: alcune sono frasi («con un clic più vecchio di…»). */
.jo-donut-l { padding: 5px 0; line-height: 1.35; color: var(--ds-text-secondary); }
.jo-donut-legend b { font-weight: 600; color: var(--ds-text-primary); font-variant-numeric: tabular-nums; }
.jo-donut-p { font-size: 12.5px; color: var(--ds-text-tertiary); text-align: right; font-variant-numeric: tabular-nums; }

.jo-slices-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ds-text-tertiary); }
.jo-slices-legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.jo-slices-legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.jo-slices-legend b { font-weight: 600; color: var(--ds-text-secondary); font-variant-numeric: tabular-nums; }

/* Barre orizzontali leggere (Conversazioni per canale): i canali coi colori dei marchi. */
.jo-barl { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.jo-barl-row { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 28px; font-size: 13.5px; }
.jo-barl-l { overflow: hidden; color: var(--ds-text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.jo-barl-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--ds-surface-sunken); }
/* Colore dell'argomento (token --ds-chart-*, owner 9-nov-2026); i canali senza
   token dei grafici (Messenger, Instagram) col colore del marchio. */
.jo-barl-fill { display: block; height: 100%; border-radius: inherit; background: var(--ds-chart-1, var(--ds-accent)); }
.jo-barl--people { background: var(--ds-chart-people, var(--ds-accent)); }
.jo-barl--email { background: var(--ds-chart-email, var(--ds-brand-email)); }
.jo-barl--whatsapp { background: var(--ds-chart-whatsapp, var(--ds-brand-whatsapp)); }
.jo-barl--ai { background: var(--ds-chart-ai, var(--ds-tone-ai-fg)); }
.jo-barl--money { background: var(--ds-chart-money, var(--ds-ok-dot)); }
.jo-barl--todo { background: var(--ds-chart-todo, var(--ds-warn-dot)); }
.jo-barl--messenger { background: color-mix(in srgb, var(--ds-brand-messenger) 85%, var(--ds-surface)); }
.jo-barl--instagram { background: color-mix(in srgb, var(--ds-brand-instagram) 85%, var(--ds-surface)); }
.jo-barl-v { min-width: 2.25rem; text-align: right; font-weight: 600; color: var(--ds-text-primary); font-variant-numeric: tabular-nums; }

/* Barra «Aggiungi un widget»: tratteggiata, i suggerimenti come pulsanti leggeri. */
.jo-addw {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 18px;
    border: 1.5px dashed var(--ds-border-strong);
    border-radius: var(--ds-radius-card);
}

.jo-addw-t { font-size: 14px; font-weight: 650; color: var(--ds-text-primary); }
.jo-addw-n { font-size: 12.5px; color: var(--ds-text-tertiary); }
.jo-addw-fill { flex: 1 1 0; }

.jo-addw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--ds-card-head-bd);
    border-radius: var(--ds-radius-control);
    background: var(--ds-surface);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-link);
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

.jo-addw-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-addw-btn svg { flex: none; width: 16px; height: 16px; }
.jo-addw-btn:hover { border-color: var(--ds-accent); background: var(--ds-accent-soft); }
.jo-addw-btn:focus-visible { outline: none; box-shadow: var(--ds-focus-ring); }
.jo-addw-btn.jo-addw-all { border-style: dashed; }

/* Campagne e invii: l'ultima campagna in testata, Email e WhatsApp a confronto. */
.jo-cmp-last {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    max-width: 55%;
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-link);
}

.jo-cmp-last-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-cmp-last-v { flex: none; font-weight: 600; color: var(--ds-text-secondary); }
.jo-cmp-last-v::before { content: '· '; color: var(--ds-text-tertiary); }
.jo-cmp-last-v.is-money { font-weight: 700; color: var(--ds-ok-fg); }
a.jo-cmp-last:hover .jo-cmp-last-t { color: var(--ds-accent-hover); }
.jo-hd.jo-pano .jo-cmp-card .jo-hd-card-h .jo-hd-card-link { margin-left: 4px; }

.jo-cmp-ch { width: 100%; margin-top: 14px; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.jo-cmp-ch th, .jo-cmp-ch td { padding: 8px 8px 8px 0; text-align: left; vertical-align: baseline; }
.jo-cmp-ch thead th { padding-top: 0; font-size: 12.5px; font-weight: 500; color: var(--ds-text-tertiary); }
.jo-cmp-ch tbody tr { border-top: 1px solid var(--ds-row-divider); }
.jo-cmp-ch tbody th { width: 90px; font-weight: 600; color: var(--ds-text-primary); }
.jo-cmp-ch td { color: var(--ds-text-secondary); }

/* Le tre campagne prima dell'ultima: una riga ciascuna, nome e risultato. */
.jo-cmp-more { margin: 10px 0 0; padding: 8px 0 0; list-style: none; border-top: 1px dashed var(--ds-border); }

.jo-cmp-more-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 -8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--ds-text-primary);
}

a.jo-cmp-more-row:hover { background: var(--ds-accent-soft); }
.jo-cmp-more-row b { flex: 1 1 auto; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.jo-cmp-more-row span { flex: none; color: var(--ds-text-tertiary); font-variant-numeric: tabular-nums; }

/* Senza invii: la frase e il link al centro della card, come gli altri vuoti. */
.jo-an-empty.jo-cmp-none .jo-an-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.jo-an-empty.jo-cmp-none .jo-an-link svg { width: 16px; height: 16px; }

/* Conversazioni per canale: i numeri del chatbot sotto le barre. */
.jo-chan-bot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--ds-border); }
.jo-chan-bot.is-alone { margin-top: 0; padding-top: 0; border-top: 0; }
.jo-chan-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; }
.jo-chan-stats > div { display: flex; align-items: baseline; gap: 6px; }
.jo-chan-stats dt { font-size: 12.5px; color: var(--ds-text-tertiary); }
.jo-chan-stats dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--ds-text-primary); font-variant-numeric: tabular-nums; }
.jo-chan-bot-t { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: var(--ds-text-tertiary); }

/* Telefono: KPI senza tessera dell'icona e valore più piccolo, gradini su
   due colonne alti uguali, striscia su più righe. */
@media (max-width: 640px) {
    .jo-hd.jo-pano > .jo-kpis { --jo-kpi-value: 1.5rem; --jo-kpi-pad: 12px; --jo-kpi-pad-x: 12px; }
    .jo-hd.jo-pano > .jo-kpis .jo-kpi > .jo-kpi-top > .jo-kpi-ic { display: none !important; }
    .jo-hd.jo-pano > .jo-kpis .jo-kpi:has(> .jo-kpi-top > .jo-kpi-ic) { padding-left: var(--jo-kpi-pad-x) !important; }
    .jo-hd.jo-pano > .jo-kpis .jo-kpi--spark > .jo-spark { width: 100%; margin-left: 0; }
    .jo-hd.jo-pano > .jo-kpis .jo-kpi > .jo-kpi-note { flex-basis: 100%; }

    .jo-stairs.jo-stairs { gap: 8px; }
    .jo-stairs-bar { width: min(clamp(32px, calc(160px / var(--jo-stairs-n, 4)), 64px), 100%); height: 88px; }
    .jo-stairs .jo-stairs-v { font-size: 18px; }

    .jo-pano .jo-hd-w > .jo-an-card { padding: 16px; }
    .jo-cmp-last { order: 3; max-width: 100%; margin-left: 0; }
    .jo-hd.jo-pano .jo-cmp-card .jo-hd-card-h { flex-wrap: wrap; }
    .jo-strip-row { flex-wrap: wrap; }
    .jo-strip-bar { flex-basis: 100%; order: 3; }
    .jo-strip-next { order: 4; flex-basis: 100%; }
    .jo-strip-more { order: 5; }
    .jo-strip-hide { order: 2; }
    .jo-addw-fill { display: none; }
    .jo-addw-n { flex-basis: calc(100% - 160px); }
}

/* ── Valore generato con Joorna (Elia 6-nov-2026) ─────────────────────────
   Il dato principale della Panoramica dell'hotel: «Joorna è un lead
   generator e una piattaforma che migliora comunicazione e CRM, un po' di
   dati economici accentuati». Il totale in euro grande, la barra divisa per
   strumento nei colori dei grafici (ChartPalette). Accanto ai KPI del periodo
   del D2 (Elia 9-nov-2026): contatti e conversazioni sono KPI, qui non si
   ripetono. */
.jo-hd-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px 28px;
    padding: 18px 20px;
    /* Fondo neutro come le altre card (Elia 9-nov-2026): il colore di fondo
       resta agli stati che chiedono un'azione (l'arancio delle cose da fare);
       il valore si distingue per misura e posto, a sinistra e alto due righe.
       Prima un velo viola → verde. */
    border: 1px solid var(--ds-border);
    border-radius: var(--jo-ui-radius, 14px);
    background: var(--ds-surface, #fff);
    box-shadow: var(--ds-shadow-card);
}

@media (min-width: 1024px) {
    .jo-hd-value { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); }
}

.jo-hd-value-h { display: flex; align-items: center; gap: 8px; margin: 0; }
.jo-hd-value-h .jo-kpi-lbl { font-size: 14px; font-weight: 600; color: var(--ds-text-primary); }
.jo-hd-value-ic {
    display: inline-flex; flex: none; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--ds-tone-people-solid-2), var(--ds-tone-people-solid));
    color: #fff;
    box-shadow: var(--ds-shadow-tile);
}
.jo-hd-value-ic svg { width: 17px; height: 17px; }

.jo-hd-value-n {
    margin: 10px 0 0;
    font-size: var(--ds-kpi-hero-value, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ds-text-primary);
    font-variant-numeric: tabular-nums;
}

.jo-hd-value-note { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0; font-size: 12.5px; color: var(--ds-text-tertiary); }

.jo-hd-value-bar {
    display: flex; gap: 3px; height: 12px; margin-top: 14px; overflow: hidden;
    border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8);
}
.jo-hd-value-bar > i { display: block; flex-basis: 0; min-width: 6px; height: 100%; }

/* A zero niente «€ 0» (Elia 10-nov-2026): l'invito a generare valore, con
   l'azione che lo porta per prima come pulsante e le altre come link. */
.jo-hd-value-lead { margin: 10px 0 0; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--ds-text-primary); }
.jo-hd-value-why { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--ds-text-secondary); }
.jo-hd-value-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.jo-hd-value-alt {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 600; color: var(--ds-accent-fg);
    text-decoration: none;
}
.jo-hd-value-alt:hover { text-decoration: underline; text-underline-offset: 3px; }
.jo-hd-value-alt:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; border-radius: 4px; }

.jo-hd-value-parts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.jo-hd-value-parts li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ds-text-secondary); }
.jo-hd-value-parts li b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary); font-variant-numeric: tabular-nums; }
.jo-hd-value-parts li.is-zero b { font-weight: 500; color: var(--ds-text-tertiary); }
.jo-hd-value-dot { flex: none; width: 10px; height: 10px; border-radius: 3px; }

.jo-hd-value-side { display: grid; gap: 10px; align-content: center; }
@media (min-width: 640px) and (max-width: 1023px) {
    .jo-hd-value-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.jo-hd-value-stat {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--ds-surface) 82%, transparent);
    color: inherit; text-decoration: none;
    transition: border-color .12s ease, background-color .12s ease;
}
a.jo-hd-value-stat[href]:hover { border-color: var(--ds-auto-bd); background: var(--ds-accent-soft); }
.jo-hd-value-stat .jo-kpi-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 9px;
}
.jo-hd-value-stat .jo-kpi-ic svg { width: 17px; height: 17px; }
.jo-hd-value-stat-l { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; color: var(--ds-text-primary); }
.jo-hd-value-stat-l small { font-size: 12px; font-weight: 400; color: var(--ds-text-tertiary); }
.jo-hd-value-stat b { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Senza la colonna accanto (nella Panoramica D2 contatti e conversazioni sono
   KPI): il blocco del valore prende tutta la riga. */
.jo-hd-value:not(:has(> .jo-hd-value-side)) { grid-template-columns: minmax(0, 1fr) !important; }

/* ── Testa della Panoramica: valore generato e KPI del periodo (Elia 9-nov-2026) ──
   La gerarchia si vede dalla misura: il valore generato con Joorna, il dato
   principale, a sinistra e alto quanto due righe di KPI; i quattro KPI del
   periodo (D2) due per riga a destra. Prima il valore era a tutta riga con
   due terzi vuoti. Fra 768 e 1279px il valore torna a tutta riga, col numero
   a sinistra e le parti a destra, e i KPI in fila; sul telefono uno sotto
   l'altro. Senza valore (.jo-hd-top senza has-value) i KPI restano in fila. */
.jo-hd-top { display: grid; gap: var(--jo-kpi-gap, 12px); }
.jo-hd-top > .jo-hd-value,
.jo-hd-top > .jo-kpis { margin: 0 !important; }

.jo-hd-top.has-value .jo-hd-value-parts li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }

@media (min-width: 1280px) {
    /* Tre colonne uguali, i KPI nelle ultime due: valore e KPI larghi uguali al pixel
       (owner 18-nov-2026, «le KPI tutte della stessa grandezza»; con 1fr | 2fr il
       valore era 5px più largo, metà dello spazio fra due KPI). */
    .jo-hd-top.has-value { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
    .jo-hd-top.has-value > .jo-kpis { grid-column: span 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jo-hd-top.has-value .jo-hd-value-main { display: flex; flex-direction: column; height: 100%; }
    /* Le parti in fondo alla card, una per riga con la cifra a destra. */
    .jo-hd-top.has-value .jo-hd-value-parts { flex-direction: column; flex-wrap: nowrap; gap: 8px; margin-top: auto; padding-top: 16px; }
    /* A zero il pulsante e i link in fondo alla card, dove stanno le parti. */
    .jo-hd-top.has-value .jo-hd-value-cta { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: auto; padding-top: 16px; }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .jo-hd-top.has-value .jo-hd-value-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "h parts" "n parts" "note parts" "bar parts";
        column-gap: 32px;
        align-items: start;
    }
    .jo-hd-top.has-value .jo-hd-value-h { grid-area: h; }
    .jo-hd-top.has-value .jo-hd-value-n { grid-area: n; }
    .jo-hd-top.has-value .jo-hd-value-note { grid-area: note; }
    .jo-hd-top.has-value .jo-hd-value-bar { grid-area: bar; }
    .jo-hd-top.has-value .jo-hd-value-parts { grid-area: parts; flex-direction: column; flex-wrap: nowrap; gap: 8px; margin: 0; align-self: center; }
    .jo-hd-top.has-value .jo-hd-value-lead { grid-area: n; }
    .jo-hd-top.has-value .jo-hd-value-why { grid-area: note; }
    .jo-hd-top.has-value .jo-hd-value-cta { grid-area: parts; margin: 0; align-self: center; }
}

/* ── Icone delle panoramiche: tutte piene e della stessa misura (owner
 *    10-nov-2026: «alcune colorate altre no, altre riempite altre no, alcune
 *    sembrano più grandi») ──
 * KPI, «Valore generato con Joorna» e testate dei riquadri: il tassello
 * comune (--ds-icon-tile, owner 11-nov-2026; prima 36px)
 * piena nel colore del suo argomento (gli stessi --ds-tone-*-solid dei KPI)
 * con l'icona bianca da 18px, anche a zero: nelle panoramiche (.jo-pano:
 * Panoramica, Dashboard generale, Chatbot, Performance) via il grigio a zero
 * di ui-standard.css. Senza argomento (neutro) il viola delle persone, come i
 * riquadri. Le sezioni di Performance: std-analytics-d2.css. */
.jo-pano { --jo-pano-ic: var(--ds-icon-tile); --jo-pano-ic-svg: var(--ds-icon-tile-svg); }

html body .jo-pano .jo-kpi > .jo-kpi-top > .jo-kpi-ic[class*='jo-tone-'],
html body .jo-pano .jo-kpi > .jo-kpi-top > .jo-kpi-ic.is-zero[class*='jo-tone-'] {
    flex: none !important;
    width: var(--jo-pano-ic) !important;
    height: var(--jo-pano-ic) !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, var(--jo-chip-2, var(--ds-tone-people-solid-2)), var(--jo-chip-1, var(--ds-tone-people-solid))) !important;
    color: var(--ds-on-accent) !important;
    box-shadow: var(--ds-shadow-tile) !important;
}
html body .jo-pano .jo-kpi > .jo-kpi-top > .jo-kpi-ic[class*='jo-tone-'] svg {
    width: var(--jo-pano-ic-svg) !important;
    height: var(--jo-pano-ic-svg) !important;
    color: var(--ds-on-accent) !important;
}

html body .jo-pano .jo-hd-value-ic { width: var(--jo-pano-ic); height: var(--jo-pano-ic); border-radius: 10px; color: var(--ds-on-accent); }
html body .jo-pano .jo-hd-value-ic svg { width: var(--jo-pano-ic-svg); height: var(--jo-pano-ic-svg); }

/* Riquadri: il tassello pieno in ::before, l'icona bianca in ::after. */
.jo-hd.jo-pano .jo-hd-w { --jo-hd-s1: var(--ds-tone-people-solid); --jo-hd-s2: var(--ds-tone-people-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-email { --jo-hd-s1: var(--ds-tone-email-solid); --jo-hd-s2: var(--ds-tone-email-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-whatsapp { --jo-hd-s1: var(--ds-tone-whatsapp-solid); --jo-hd-s2: var(--ds-tone-whatsapp-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-ai { --jo-hd-s1: var(--ds-tone-ai-solid); --jo-hd-s2: var(--ds-tone-ai-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-money { --jo-hd-s1: var(--ds-tone-money-solid); --jo-hd-s2: var(--ds-tone-money-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-todo { --jo-hd-s1: var(--ds-tone-todo-solid); --jo-hd-s2: var(--ds-tone-todo-solid-2); }
.jo-hd.jo-pano .jo-hd-w--t-stay { --jo-hd-s1: var(--ds-tone-stay-solid); --jo-hd-s2: var(--ds-tone-stay-solid-2); }

html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type {
    min-height: var(--jo-pano-ic);
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    padding-left: calc(var(--jo-pano-ic) + 10px) !important;
}
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::before {
    width: var(--jo-pano-ic);
    height: var(--jo-pano-ic);
    background: linear-gradient(135deg, var(--jo-hd-s2), var(--jo-hd-s1));
    box-shadow: var(--ds-shadow-tile);
}
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type::after {
    top: calc((var(--jo-pano-ic) - var(--jo-pano-ic-svg)) / 2);
    left: calc((var(--jo-pano-ic) - var(--jo-pano-ic-svg)) / 2);
    width: var(--jo-pano-ic-svg);
    height: var(--jo-pano-ic-svg);
    background: var(--ds-on-accent);
}
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card h3:first-of-type + .jo-an-card-hint,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card .jo-hd-card-h:has(> div > h3:first-child) .jo-an-card-hint,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card .jo-gd-card-h:has(> div > h3:first-child) .jo-an-card-hint,
html body .jo-hd.jo-pano .jo-hd-w.jo-hd-w[style*="--jo-hd-ic"] .jo-an-card > .jo-hd-card-h:first-child + .jo-an-card-hint {
    padding-left: calc(var(--jo-pano-ic) + 10px) !important;
}

/* ── Amministrazione ▸ Notifiche (NotificationSettingsPage, owner 19-nov-2026) ──
   A destra di ogni avviso due posti fissi, campanella poi email: l'icona del
   canale (nome nel tooltip) accanto al suo interruttore; un canale che
   l'avviso non ha lascia il posto vuoto, così gli interruttori stanno in colonna. */
html .jo-row-ctl > .fi-fo-component-ctn:has(> div > :is(.jo-notif-pair, .fi-fo-field-wrp .jo-notif-slot)) { grid-template-columns: 66px 66px; grid-auto-flow: row; gap: 18px !important; }
html .jo-notif-pair > .fi-fo-component-ctn { display: flex !important; align-items: center; justify-content: flex-end; gap: 6px !important; }
html .jo-notif-ch { display: inline-flex; color: var(--ds-text-secondary); cursor: default; }
html .jo-notif-slot { display: block; width: 66px; height: 24px; }
/* Ogni avviso ha due canali e la sua descrizione: una colonna sola, anche dove
   un gruppo di soli interruttori andrebbe su due (form-standard.css), e la
   linea sotto la prima riga come sotto le altre. */
html .jo-rows:has(.jo-notif-pair) > .fi-fo-component-ctn { grid-template-columns: minmax(0, 1fr) !important; }
html .jo-rows:has(.jo-notif-pair) > .fi-fo-component-ctn > div:nth-child(2) > .jo-row::before { display: block !important; }
