/*
 * App mobile (owner 7-ott-2026): stessa piattaforma, sul telefono come una
 * app. Sotto i 768px niente sidebar né hamburger: la barra in basso con al
 * massimo 5 tasti (App\Support\Mobile\MobileNav, vista
 * filament.layouts.mobile-tabbar); le tab aprono schermate-elenco (mai
 * tabelle, <x-jo.m-row>); l'Inbox è elenco → chat a tutto schermo
 * (public/js/mobile.js). Le liste delle altre sezioni si aprono in Card
 * (table-columns.js). Solo token del design system.
 */

:root {
    --jo-mtab-h: 62px;
    --jo-mtab-space: calc(var(--jo-mtab-h) + env(safe-area-inset-bottom, 0px));
}

.jo-mtab { display: none; }

@media (max-width: 767px) {
    /* ── Barra in basso ───────────────────────────────────── */
    .jo-mtab {
        position: fixed;
        inset: auto 0 0;
        /* Sopra il contenuto, sotto modali e menu a comparsa. */
        z-index: 25;
        display: grid;
        grid-template-columns: repeat(var(--jo-mtab-cols, 5), minmax(0, 1fr));
        height: var(--jo-mtab-space);
        padding: 6px 4px env(safe-area-inset-bottom, 0px);
        background: var(--ds-bg-sidebar, #F8F9FB);
        border-top: 1px solid var(--ds-border, #DFE2EA);
    }

    .jo-mtab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 3px;
        min-width: 0;
        color: var(--ds-text-tertiary, #5B5B6B);
        font-size: 11px;
        font-weight: 500;
        line-height: 1.2;
        -webkit-tap-highlight-color: transparent;
    }

    .jo-mtab-ic {
        position: relative;
        display: grid;
        place-items: center;
        width: 56px;
        height: 30px;
        border-radius: 999px;
        color: var(--ds-nav-icon, #8A8A99);
        transition: background-color .12s ease;
    }

    .jo-mtab-ic svg { width: 22px; height: 22px; }

    .jo-mtab-lbl {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jo-mtab-item.is-active { color: var(--ds-accent-fg, #5F45A8); font-weight: 600; }
    .jo-mtab-item.is-active .jo-mtab-ic {
        background: var(--ds-nav-active-bg, #F0EAFB);
        color: var(--ds-accent, #7C5CCB);
    }

    .jo-mtab-item:active .jo-mtab-ic { background: var(--ds-nav-hover, #EEF0F5); }
    .jo-mtab-item:focus-visible { outline: none; }
    .jo-mtab-item:focus-visible .jo-mtab-ic { box-shadow: 0 0 0 2px var(--ds-focus-ring, #7C5CCB); }

    .jo-mtab-badge {
        position: absolute;
        top: -2px;
        left: calc(50% + 7px);
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border: 2px solid var(--ds-bg-sidebar, #F8F9FB);
        border-radius: 999px;
        background: var(--ds-accent, #7C5CCB);
        color: var(--ds-on-accent, #fff);
        font-size: 10px;
        font-weight: 600;
        line-height: 14px;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    /* Almeno un avviso urgente: il numero è rosso (owner 30-ott-2026). */
    .jo-mtab-badge--urgent { background: var(--ds-err-dot, #D96B6B); }

    /* Tasto centrale AI: tessera lilla tenue con le scintille viola (.jo-ai-action),
     * piena quando l'assistente è aperto. */
    .jo-mtab-item--ai { border: 0; background: transparent; cursor: pointer; color: var(--ds-accent-fg, #5F45A8); }
    .jo-mtab-item--ai .jo-mtab-ic {
        width: 46px;
        height: 46px;
        margin-top: -16px;
        border: 1.5px solid var(--ds-accent, #7C5CCB);
        background: var(--ds-accent-soft, #F3EEFC);
        color: var(--ds-accent, #7C5CCB);
        box-shadow: 0 0 0 4px var(--ds-bg-sidebar, #F8F9FB);
    }

    body:has(.jo-ai-win:not([style*="display: none"])) .jo-mtab-item--ai .jo-mtab-ic {
        background: var(--ds-accent, #7C5CCB);
        color: var(--ds-on-accent, #fff);
    }

    /* Assistente AI a tutto schermo fra la topbar e la barra; niente pallino
     * flottante né pulsante in topbar: si apre dal tasto centrale. */
    body:has(.jo-mtab) .jo-ai-dot,
    body:has(.jo-mtab) .jo-ai-topbar-btn {
        display: none !important;
    }

    body:has(.jo-mtab) .jo-ai-win {
        position: fixed !important;
        inset: var(--jo-topbar-h, 64px) 0 var(--jo-mtab-space) 0 !important;
        z-index: 24;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        max-height: none !important;
        border-width: 1px 0 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Ridurre o allargare non ha senso a tutto schermo: resta solo Chiudi. */
    body:has(.jo-mtab) .jo-ai-head .jo-icon-btn:not(:last-child) { display: none; }
    body:has(.jo-mtab) .jo-ai-head { cursor: default; }

    /* ── Niente sidebar: tutto passa dalla barra (e da Altro) ─ */
    body:has(.jo-mtab) .fi-sidebar,
    body:has(.jo-mtab) .fi-sidebar-close-overlay,
    body:has(.jo-mtab) .fi-topbar-open-sidebar-btn,
    body:has(.jo-mtab) .fi-topbar-close-sidebar-btn {
        display: none !important;
    }

    /* Il contenuto finisce sopra la barra. */
    body:has(.jo-mtab) { padding-bottom: var(--jo-mtab-space); }

    /* Piedi fissi dei form (Annulla / Salva) e assistente AI sopra la barra. */
    body:has(.jo-mtab) .fi-form-actions.fi-sticky,
    body:has(.jo-mtab) .fi-resource-edit-record-page.fi-resource-hotels .fi-form-actions {
        bottom: var(--jo-mtab-space);
    }

    body:has(.jo-mtab) .jo-ai-dot { margin-bottom: var(--jo-mtab-space); }

    /* ── Inbox: elenco oppure chat, a tutto schermo ───────── */
    body:has(.jo-mtab) .jo-inbox-root {
        grid-template-rows: minmax(0, 1fr) !important;
        height: calc(100dvh - var(--jo-topbar-h, 64px) - var(--jo-mtab-space) - 24px);
    }

    body:has(.jo-mtab) .jo-inbox-root > aside,
    body:has(.jo-mtab) .jo-inbox-root > main {
        min-height: 0 !important;
        border: 0 !important;
    }

    .jo-inbox-root:not(.jo-ibx-show-chat) > main,
    .jo-inbox-root.jo-ibx-show-chat > aside {
        display: none !important;
    }

    /* In chat: niente testata della pagina, la conversazione prende lo schermo. */
    body:has(.jo-ibx-show-chat) .jo-ibx-head,
    body:has(.jo-ibx-show-chat) .jo-ibx-kpis {
        display: none;
    }

    body:has(.jo-ibx-show-chat) .jo-inbox-root {
        height: calc(100dvh - var(--jo-topbar-h, 64px) - var(--jo-mtab-space));
    }

    .jo-ibx-back.jo-icon-btn {
        display: inline-flex;
        flex: none;
        width: 36px;
        height: 36px;
        margin-left: -8px;
    }

    .jo-ibx-back svg { width: 20px; height: 20px; }

    /* Liste in Card sul telefono (owner 7-ott-2026): testi a capo. Il testo
       resta chiuso a 3 righe coi puntini come sul computer (T5, 29-ott-2026,
       joorna-standard.css): qui l'etichetta va solo a capo, senza uscire. */
    body:has(.jo-mtab) .jo-ta-cards td,
    body:has(.jo-mtab) .jo-ta-cards td .truncate,
    body:has(.jo-mtab) .jo-ta-cards td .fi-ta-text-item {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        overflow-wrap: anywhere;
        max-width: 100% !important;
    }
    body:has(.jo-mtab) .jo-ta-cards td .fi-ta-text-item-label {
        white-space: normal !important;
        overflow-wrap: anywhere;
        max-width: 100% !important;
    }
    body:has(.jo-mtab) .jo-ta-cards td:last-child .jo-row-actions,
    body:has(.jo-mtab) .jo-ta-cards td:last-child .fi-ta-actions { justify-content: flex-start; gap: 8px; }
    body:has(.jo-mtab) .jo-ta-cards td:last-child .fi-icon-btn,
    body:has(.jo-mtab) .jo-ta-cards td:last-child .fi-btn { min-width: 44px; min-height: 44px; }

    /* Inbox in chat (owner 7-ott-2026): testata compatta, messaggi al centro,
       composer in basso sopra la barra; l'ospite in un foglio dal basso. */
    .jo-ibx-chat-head { padding: 8px 10px !important; gap: 6px; }
    .jo-ibx-chat-head .jo-ibx-head-avatar { display: none !important; }
    .jo-ibx-chat-head .jo-ibx-head-meta { gap: 2px 10px; }
    .jo-ibx-chat-tools { gap: 0 !important; flex: none; }
    .jo-ibx-chat-tools .jo-icon-btn { width: 36px; height: 36px; }
    .jo-ibx-resume textarea { max-height: 96px; overflow: auto; }
    .jo-inbox-root .jo-ibx-guest-btn { display: inline-flex; }
    .jo-inbox-root.jo-ibx-show-chat.jo-ibx-show-guest > aside.jo-ibx-aside {
        display: block !important;
        position: fixed;
        left: 0; right: 0;
        bottom: var(--jo-mtab-space);
        max-height: 72dvh;
        overflow-y: auto;
        z-index: 40;
        background: var(--ds-surface, #FCFCFD);
        border-top: 1px solid var(--ds-border, #DFE2EA) !important;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -12px 32px rgba(15, 23, 42, .18);
        padding-top: 8px;
    }
    .jo-ibx-show-guest > aside.jo-ibx-aside .jo-ibx-collapse,
    .jo-ibx-show-guest > aside.jo-ibx-aside .jo-ibx-rail-label { display: none !important; }
    .jo-ibx-show-guest > aside.jo-ibx-aside .jo-ibx-sheet-close { display: inline-flex; position: absolute; top: 8px; right: 8px; }

    /* ── Inbox email: ricerca e canali in alto, poi elenco oppure email ─
     * Le cartelle e "Sincronizza" restano sul computer. */
    body:has(.jo-mtab) .jo-email {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        height: calc(100dvh - var(--jo-topbar-h, 64px) - var(--jo-mtab-space) - 24px);
    }

    body:has(.jo-mtab) .jo-email > .jo-col { border-right: 0; }
    body:has(.jo-mtab) .jo-email > .jo-col--folders { border-bottom: 1px solid var(--ds-border, #DFE2EA); }
    body:has(.jo-mtab) .jo-email > .jo-col--folders > .jo-scroll,
    body:has(.jo-mtab) .jo-email > .jo-col--read { display: none; }

    /* iOS non ingrandisce la pagina al tocco con 16px. */
    body:has(.jo-mtab) .jo-email .jo-search { font-size: 16px; }

    body:has(.jo-mtab) .jo-email.jo-mail-show-read { grid-template-rows: minmax(0, 1fr); }
    body:has(.jo-mtab) .jo-email.jo-mail-show-read > .jo-col--folders,
    body:has(.jo-mtab) .jo-email.jo-mail-show-read > .jo-col--list { display: none; }
    body:has(.jo-mtab) .jo-email.jo-mail-show-read > .jo-col--read { display: flex; }

    body:has(.jo-mail-show-read) .jo-ibx-head { display: none; }
    body:has(.jo-mail-show-read) .jo-email { height: calc(100dvh - var(--jo-topbar-h, 64px) - var(--jo-mtab-space)); }

    body:has(.jo-mtab) .jo-email .jo-readhead { padding: 12px 16px; }
    body:has(.jo-mtab) .jo-email .jo-readhead .jo-ibx-back { margin-bottom: 4px; }
    body:has(.jo-mtab) .jo-email .jo-msg { max-width: 100%; }

    /* Le schermate dell'app: niente descrizione sotto il titolo. */
    .fi-page:has(.jo-m) .fi-header-subheading { display: none; }
}

.jo-ibx-back { display: none; }
.jo-ibx-guest-btn, .jo-ibx-sheet-close { display: none; }

/* ── Schermate dell'app (Oggi, Preventivi, Ospiti, Altro) ─────── */
.jo-m {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 720px;
}

.jo-m-sec { display: flex; flex-direction: column; gap: 8px; }

.jo-m-h {
    margin: 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-tertiary, #5B5B6B);
}

/* Elenco: un riquadro, righe separate da un filetto. */
.jo-m-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-radius: 12px;
    background: var(--ds-surface, #FCFCFD);
    box-shadow: var(--ds-shadow-rest, none);
    overflow: hidden;
}

.jo-m-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 6px;
}

.jo-m-row + .jo-m-row { border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }

.jo-m-row-main {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px 7px 14px;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* Riga che invia un form (entrare in un hotel, tornare alla Console). */
.jo-m-row-form { display: flex; flex: 1; min-width: 0; margin: 0; }

button.jo-m-row-main {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

:is(a, button).jo-m-row-main:active { background: var(--ds-surface-hover, #ECEEF3); }
:is(a, button).jo-m-row-main:focus-visible { outline: 2px solid var(--ds-accent, #7C5CCB); outline-offset: -2px; }

@media (hover: hover) {
    :is(a, button).jo-m-row-main:hover { background: var(--ds-accent-soft, #F3EEFC); }
}

.jo-m-av {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--ds-accent-soft, #F3EEFC);
    color: var(--ds-accent-fg, #5F45A8);
    font-size: 12.5px;
    font-weight: 600;
}

.jo-m-ic.jo-kpi-ic {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 9px;
}

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

.jo-m-txt { flex: 1; min-width: 0; }

.jo-m-txt b,
.jo-m-txt small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-m-txt b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-m-txt small { margin-top: 1px; font-size: 12px; color: var(--ds-text-placeholder, #6B6B7B); }

.jo-m-status { flex: none; font-size: 12px; }

.jo-m-val {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-secondary, #3F3F46);
    font-variant-numeric: tabular-nums;
}

/* "Da fare": il numero come un contatore, viola pieno come i badge del menu. */
.jo-m-row--count .jo-m-val {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--ds-accent, #7C5CCB);
    color: var(--ds-on-accent, #fff);
    font-size: 12px;
    line-height: 22px;
    text-align: center;
}

.jo-m-go { flex: none; width: 18px; height: 18px; color: var(--ds-text-disabled, #8A8A99); }

/* Avvisi per priorità (owner 30-ott-2026, stile iPhone): alta rosso, media
   arancio, bassa grigio (ConsoleData::PRIORITIES). In testa alla pagina
   Avvisi le tre tessere come le liste di Promemoria; nelle righe l'icona del
   tipo d'avviso nella tessera del colore della priorità; in "Da fare adesso"
   il segno della priorità e il numero col suo colore (pieno per le alte). */
.jo-m-prio-alta { --jo-prio: var(--ds-err-dot, #D96B6B); --jo-prio-bg: var(--ds-err-bg, #FDECEC); --jo-prio-fg: var(--ds-err-fg, #A11A1A); --jo-prio-bd: var(--ds-err-bd, #F6C6C6); }
.jo-m-prio-media { --jo-prio: var(--ds-warn-dot, #D9A048); --jo-prio-bg: var(--ds-warn-bg, #FEF3E2); --jo-prio-fg: var(--ds-warn-fg, #8A4B00); --jo-prio-bd: var(--ds-warn-bd, #F9D9A6); }
.jo-m-prio-bassa { --jo-prio: var(--ds-off-dot, #8A8A99); --jo-prio-bg: var(--ds-off-bg, #F1F2F6); --jo-prio-fg: var(--ds-off-fg, #4A4A57); --jo-prio-bd: var(--ds-off-bd, #DDE0E8); }

.jo-m-h--prio { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--jo-prio-fg); }
.jo-m-h--prio::before { content: ''; flex: none; width: 9px; height: 9px; border-radius: 999px; background: var(--jo-prio); }

/* L'icona nella tessera del colore della priorità, come le Impostazioni
   dell'iPhone (!important: i toni delle icone, ui-standard.css, lo usano). */
html .jo-m-row[class*="jo-m-prio-"] .jo-m-ic.jo-kpi-ic { background: var(--jo-prio) !important; color: var(--ds-on-accent, #fff) !important; }
html .jo-m-row[class*="jo-m-prio-"] .jo-m-ic.jo-kpi-ic svg { color: var(--ds-on-accent, #fff); }

.jo-m-row--count[class*="jo-m-prio-"] .jo-m-val { background: var(--jo-prio-bg); color: var(--jo-prio-fg); box-shadow: inset 0 0 0 1px var(--jo-prio-bd); }
.jo-m-row--count.jo-m-prio-alta .jo-m-val { background: var(--jo-prio); color: var(--ds-on-accent, #fff); box-shadow: none; }
.jo-m-row--count.jo-m-prio-alta .jo-m-txt b { color: var(--jo-prio-fg); }

/* Le tre tessere in testa agli Avvisi: segno e numero in alto, nome sotto; un tocco filtra. */
.jo-alert-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.jo-alert-tile { display: grid; grid-template-areas: "ic n" "t t"; grid-template-columns: auto 1fr; align-items: center; gap: 8px 6px; min-width: 0; padding: 12px; border: 0; border-radius: 16px; background: var(--ds-surface, #FCFCFD); text-align: left; box-shadow: 0 1px 2px rgb(20 22 40 / .04); transition: opacity .15s ease, box-shadow .15s ease; }
.jo-alert-tile-ic { display: grid; grid-area: ic; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--jo-prio); color: var(--ds-on-accent, #fff); }
.jo-alert-tile-ic svg { width: 18px; height: 18px; }
.jo-alert-tile-n { grid-area: n; justify-self: end; font-size: 26px; font-weight: 700; line-height: 1; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; }
.jo-alert-tile-t { grid-area: t; font-size: 14px; font-weight: 600; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-alert-tile.is-on { box-shadow: 0 0 0 2px var(--jo-prio); }
.jo-alert-tile.is-dim { opacity: .45; }
/* A zero la tessera resta del suo colore (owner 30-ott-2026): non si tocca, ma alta resta rossa, media gialla, bassa grigia. */
.jo-alert-tile:disabled { cursor: default; }

/* Azioni a un tocco (chiama, WhatsApp): bersagli da 40px. */
.jo-m-row .jo-m-act.jo-icon-btn { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.jo-m-row .jo-m-act svg { width: 20px; height: 20px; }

/* "+ Nuova richiesta": la CTA minimal delle liste (tessera tratteggiata, label viola). */
.jo-m-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 4px 2px;
    color: var(--ds-accent-fg, #5F45A8);
    font-size: 14px;
    font-weight: 600;
}

.jo-m-ctas { display: flex; flex-wrap: wrap; gap: 4px 24px; }
button.jo-m-cta { border: 0; background: transparent; cursor: pointer; font-family: inherit; }

.jo-m-cta-ic {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1.5px dashed var(--ds-accent, #7C5CCB);
    border-radius: 9px;
    color: var(--ds-accent, #7C5CCB);
    transition: background-color .12s ease, color .12s ease;
}

.jo-m-cta-ic svg { width: 18px; height: 18px; }
.jo-m-cta:active .jo-m-cta-ic { background: var(--ds-accent, #7C5CCB); border-style: solid; color: var(--ds-on-accent, #fff); }

/* Modulo ridotto (Nuova richiesta): sezioni e Registra in colonna. */
.jo-m-form { display: flex; flex-direction: column; gap: 16px; }

/* Righe con un testo da leggere per intero (note, ospiti). */
.jo-m-row--wrap .jo-m-txt small { white-space: normal; }

/* Grafico dell'andamento, nello stesso riquadro degli elenchi. */
.jo-m-chart {
    padding: 12px 10px 6px;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-radius: 12px;
    background: var(--ds-surface, #FCFCFD);
    box-shadow: var(--ds-shadow-rest, none);
}

/* Ricerca in testa agli elenchi. */
.jo-m-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-radius: 12px;
    background: var(--ds-field-bg, #FEFEFF);
    color: var(--ds-text-placeholder, #6B6B7B);
}

.jo-m-search:focus-within { border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 3px var(--ds-field-focus-halo, rgba(124, 92, 203, .15)); }
.jo-m-search svg { width: 18px; height: 18px; flex: none; }

.jo-m-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ds-text-primary, #18181B);
    /* 16px: iOS non ingrandisce la pagina al tocco. */
    font-size: 16px;
    outline: none;
    box-shadow: none;
}

.jo-m-search input::placeholder { color: var(--ds-text-placeholder, #6B6B7B); }

.jo-m-busy { opacity: .55; transition: opacity .15s ease; }

.jo-m-more {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ds-accent-fg, #5F45A8);
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.jo-m-more:active { background: var(--ds-accent-soft, #F3EEFC); }

.jo-m-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 16px 14px;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-radius: 12px;
    background: var(--ds-surface, #FCFCFD);
    font-size: 13.5px;
    color: var(--ds-text-tertiary, #5B5B6B);
}

.jo-m-empty svg { width: 20px; height: 20px; flex: none; color: var(--ds-text-disabled, #8A8A99); }

/* Telefono (owner 7-ott-2026): un pannello a scorrimento (campanella delle
   notifiche, filtri…) copre tutto lo schermo, sopra la barra di navigazione. */
@media (max-width: 767px) {
    .fi-modal:has(.fi-modal-slide-over-window) { z-index: 45 !important; }
    .fi-modal-slide-over-window { max-width: 100vw !important; }
    .fi-no-database .fi-no-notification,
    .fi-modal-slide-over-window .fi-no-notification { padding-block: 14px; }
}

/* ── Bottoni sul telefono (owner 12-ott-2026) ─────────────────────
 * Sul telefono i bottoni non sono quelli del computer: si toccano col
 * dito. Bersagli da 44px (40px le sole icone), testo 15px, raggio 12px;
 * il piede dei moduli e dei pop-up mette la CTA a tutta larghezza in
 * cima e le altre sotto, divise in parti uguali, mai righe spezzate a
 * caso. Vale in ogni pagina aperta dal telefono (barra in basso). Il
 * compositore del preventivo ha il suo piede compatto (std-quotes.css). */
@media (max-width: 767px) {
    body:has(.jo-mtab) :is(.fi-form-actions, .fi-modal-footer, .fi-header, .jo-m) .fi-btn {
        min-height: 44px;
        padding-inline: 16px;
        border-radius: 12px;
        font-size: 15px;
    }

    body:has(.jo-mtab) :is(.fi-header, .fi-modal-footer) :is(.fi-icon-btn, .jo-icon-btn) {
        min-width: 40px;
        min-height: 40px;
    }

    /* Piede dei moduli: CTA in cima a tutta larghezza, poi le altre
       (Annulla compreso) affiancate in parti uguali. */
    body:has(.jo-mtab) .fi-form-actions:not(.jo-qcomp-main .fi-form-actions) .fi-ac {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    body:has(.jo-mtab) .fi-form-actions:not(.jo-qcomp-main .fi-form-actions) .fi-ac > * {
        flex: 1 1 0;
        min-width: 0;
        margin: 0 !important;
    }

    body:has(.jo-mtab) .fi-form-actions:not(.jo-qcomp-main .fi-form-actions) .fi-ac > :first-child { flex-basis: 100%; }

    body:has(.jo-mtab) .fi-form-actions:not(.jo-qcomp-main .fi-form-actions) .fi-btn {
        width: 100%;
        justify-content: center;
        white-space: nowrap;
    }

    /* Pagine con la barra delle sezioni (NavigatesSections, Elia 9-nov-2026):
       Indietro e Avanti su una riga sola, metà e metà, il nome della sezione
       coi puntini se non ci sta; con una modifica in sospeso diventano due
       frecce da 44px ai lati e Annulla e Salva si dividono il centro. Prima
       erano due righe intere sopra la barra dell'app. */
    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac {
        flex-wrap: nowrap !important;
    }

    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac > * {
        flex: 1 1 0 !important;
        min-width: 0;
    }

    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-btn {
        min-width: 0;
        padding-inline: 12px;
    }

    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-btn-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Annulla largo quanto la sua parola: lo spazio va a Salva (il pulsante
       di invio del modulo, type="submit"). */
    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac > .jo-fa-dirty:not([type="submit"]) {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    html body.jo-form-dirty:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac > .jo-sec-nav {
        flex: 0 0 44px !important;
        width: 44px;
        padding-inline: 0;
    }

    html body.jo-form-dirty:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .jo-sec-nav .fi-btn-label {
        display: none;
    }

    /* In creazione (Registra hotel, owner 11-nov-2026) la CTA c'è sempre: le
       frecce da 44px da subito, come con una modifica in sospeso. */
    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac:has(> [type="submit"]:not(.jo-fa-dirty)) > .jo-sec-nav {
        flex: 0 0 44px !important;
        width: 44px;
        padding-inline: 0;
    }

    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac:has(> [type="submit"]:not(.jo-fa-dirty)) > .jo-sec-nav .fi-btn-label {
        display: none;
    }

    html body:has(.jo-mtab) .fi-page.jo-sec-page .fi-form-actions .fi-ac:has(> [type="submit"]:not(.jo-fa-dirty)) > :not([type="submit"]):not(.jo-sec-nav) {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* Pop-up: i bottoni uno sotto l'altro, a tutta larghezza, la conferma in cima. */
    body:has(.jo-mtab) .fi-modal-footer-actions {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body:has(.jo-mtab) .fi-modal-footer-actions > *,
    body:has(.jo-mtab) .fi-modal-footer-actions .fi-btn { width: 100%; justify-content: center; }

    /* La conferma (piena, viola o rossa) prima di Annulla, qualunque sia l'ordine del pop-up. */
    body:has(.jo-mtab) .fi-modal-footer-actions > :is(.fi-color-primary, .fi-color-danger):not(.fi-btn-outlined),
    body:has(.jo-mtab) .fi-modal-footer-actions > :has(> :is(.fi-color-primary, .fi-color-danger):not(.fi-btn-outlined)) { order: -1; }

    /* Testata della pagina: le icone (e i tre puntini) su una riga, i
       bottoni con il testo sotto, a tutta larghezza. */
    body:has(.jo-mtab) .fi-header .fi-ac { flex-wrap: wrap; gap: 6px; width: 100%; }
    body:has(.jo-mtab) .fi-header .fi-ac > .fi-btn { order: 10; flex: 1 1 100%; justify-content: center; }
}

/* ── Revisione 19-ott-2026: schermate dell'app ───────────────────
 * - Sul computer la colonna dell'app (720px) sta al centro, con la sua
 *   testata, invece che a sinistra con metà schermo vuota.
 * - I tre numeri in testa usano il disegno KPI standard (.jo-kpi con
 *   l'icona in tessera, filament.pages.mobile.stats): sempre 3 per riga.
 * - L'evidenza al passaggio copre tutta la riga, fino al bordo destro.
 * - Le sezioni di un elenco (es. "Tutti gli ospiti") hanno lo stesso
 *   passo di 20px delle altre etichette di gruppo.
 * - Titolo del grafico (Console ▸ Home): cosa disegna, in una riga.
 * - Sul telefono la testata senza azioni non lascia un vuoto: il blocco
 *   vuoto delle azioni sparisce, fra titolo e prima card restano i 20px
 *   del passo verticale unico. */
.jo-m { width: 100%; margin-inline: auto; }
.fi-page:has(.jo-m) .fi-header { width: 100%; max-width: 720px; margin-inline: auto; }

.jo-kpis.jo-m-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.jo-m-row { padding-right: 0; }
.jo-m-row:has(> .jo-m-act) { padding-right: 6px; }

@media (hover: hover) {
    :is(a, button).jo-m-row-main:hover { background: transparent; }
    .jo-m-row:has(:is(a, button).jo-m-row-main:hover) { background: var(--ds-accent-soft, #F3EEFC); }
}

.jo-m-sections { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 639px) {
    .fi-header > div:last-child:not(:has(*)) { display: none; }
}

/* ── Inbox sul telefono, revisione 19-ott-2026 ────────────────────
 * "Risposte automatiche" (fulmine) sta sulla riga dei filtri per canale,
 * non da solo su una riga della testata; sul computer resta in testata. */
.jo-ibx-ch-tool { display: none; flex: 0 0 auto; }

@media (max-width: 767px) {
    .jo-ibx-head .jo-ibx-autopilot { display: none; }
    .jo-ibx-ch .jo-ibx-ch-tool { display: inline-flex; }
}

/* ══ Card sul telefono più basse (revisione 19-ott-2026) ══
   Una card degli Ospiti era alta ~230px per tre dati: le icone delle azioni
   avevano una riga loro da 44px sotto i dati. Sotto i 640px, con al massimo
   tre azioni, le icone stanno in alto a destra sulla testata della card
   (40px come le icone sul telefono); con più azioni restano sotto. */
@media (max-width: 639px) {
    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(4))) {
        position: relative;
    }

    /* Centrate sulla testata di una riga (52px), senza il filetto e lo
       spazio che servono solo quando stanno in fondo alla card (29-ott-2026:
       le icone cadevano sul bordo della testata). */
    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(4))) > td.fi-ta-actions-cell {
        position: absolute;
        top: 0;
        right: 4px;
        width: auto !important;
        height: 52px;
        align-items: center;
        padding: 0 !important;
        border-top: 0;
        z-index: 1;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(4))) > td.fi-ta-actions-cell > * {
        padding-block: 0 !important;
    }

    body .jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-actions-cell :is(.fi-icon-btn, .jo-row-slot-empty) {
        min-width: 40px;
        min-height: 40px;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(4))) > :is(td[data-jo-label]:first-of-type, td.fi-ta-selection-cell + td[data-jo-label]) {
        padding-right: 136px !important;
        min-height: 52px;
    }

    /* Con una o due icone la testata tiene libero solo il loro spazio: con 136px
       un numero di telefono finiva coi puntini (Destinatari WhatsApp, 4-nov-2026). */
    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(3))) > :is(td[data-jo-label]:first-of-type, td.fi-ta-selection-cell + td[data-jo-label]) {
        padding-right: 96px !important;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr:not(:has(> td.fi-ta-actions-cell .jo-row-actions > :nth-child(2))) > :is(td[data-jo-label]:first-of-type, td.fi-ta-selection-cell + td[data-jo-label]) {
        padding-right: 56px !important;
    }
}

/* App sul telefono: tre KPI per riga a 390px lasciavano all'etichetta
   ~50px ("Conver…", "Hotel a…"). Sotto i 640px niente icona in tessera:
   etichetta e valore prendono tutta la tessera (revisione 19-ott-2026). */
@media (max-width: 639px) {
    .jo-m-kpis .jo-kpi > .jo-kpi-top > .jo-kpi-ic { display: none; }
    html body .jo-m-kpis .jo-kpi:has(> .jo-kpi-top > .jo-kpi-ic) { padding-left: var(--jo-kpi-pad-x, 12px) !important; }
}

/* Esempio per l'approvazione dei modelli WhatsApp: sul telefono 16px, sotto
   iOS fa lo zoom della pagina al tocco (19-ott-2026). */
@media (max-width: 767px) {
    .jo-wa-example input { font-size: 16px !important; }
}

/* === Preventivi nell'app: Richieste | Preventivi, schede e modulo (20-ott-2026) ===
 * MobileQuotes, MobileQuoteCard (request-card, quote-card), MobileQuoteRequest.
 * - Il menu orizzontale della piattaforma in testa, poi la barra a icone:
 *   "+" a sinistra, Cerca e Stato a destra (40px, come le icone sul telefono).
 * - Le righe: a destra lo stato col pallino, sotto "Urgente" o il totale.
 * - Le schede: il riepilogo fisso della richiesta / del preventivo col
 *   disegno della richiesta associata (lilla tenue, maiuscoletto). */
.jo-mq { display: flex; flex-direction: column; gap: 12px; }
.jo-mq > .jo-mq-menu { margin-bottom: 0; }
.jo-mq-menu.fi-page-sub-navigation-tabs { width: 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }

.jo-mq-bar { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.jo-mq-new { min-width: 0; min-height: 40px; gap: 8px; padding: 0 4px 0 0; }
.jo-mq-new .jo-m-cta-ic { flex: none; width: 28px; height: 28px; border-radius: 8px; }
.jo-mq-new-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* I numeri del computer in testa alla lista: due per riga, alti uguali, la
   nota su una riga (la spiegazione intera è nel computer e nella "i" dei titoli). */
.jo-mq-kpis .jo-kpis.jo-m-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jo-mq-kpis .jo-info { display: none; }
html body .jo-mq-kpis .jo-kpi > .jo-kpi-note { flex-basis: 100%; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
/* La scadenza del preventivo coi colori del computer (QuoteFacts::expiry, .jo-q-expiry--*). */
.jo-mq-row .jo-m-txt small.is-danger { color: var(--jo-ui-danger); }
.jo-mq-row .jo-m-txt small.is-warning { color: var(--jo-ui-warn); }
.jo-mq-row .jo-m-txt small.is-ok { color: var(--jo-ui-ok); }
.jo-mq-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
/* La freccia Indietro a sinistra sulla riga delle icone (owner 30-ott-2026): bersaglio da 40px come le altre. */
.jo-mq-bar .jo-mq-back { width: 40px; height: 40px; margin: 0; }
.jo-mq-bar .jo-mq-back svg { width: 22px; height: 22px; }

.jo-mq-tool.jo-icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--ds-text-tertiary, #5B5B6B);
}

.jo-mq-tool svg { width: 20px; height: 20px; }
.jo-mq-tool.is-on { background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent, #7C5CCB); }

.jo-mq-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--ds-accent, #7C5CCB);
}

.jo-mq-active { display: flex; align-items: center; gap: 6px; margin: 0 2px; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mq-active b { font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mq-clear { margin-left: auto; padding: 4px 2px; border: 0; background: none; color: var(--ds-accent-fg, #5F45A8); font: inherit; font-weight: 600; cursor: pointer; }

.jo-mq-row .jo-m-row-main { align-items: flex-start; }
.jo-mq-note { font-size: 12px !important; }
.jo-mq-side { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 1px; }
.jo-mq-side .jo-m-val { font-size: 13.5px; }

/* Riepilogo della scheda (owner 20-ott-2026: il più basso possibile):
   due righe, chi e stato/totale, poi soggiorno o validità e letture. */
.jo-mq-strip {
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--ds-accent, #7C5CCB) 28%, var(--ds-border, #DFE2EA));
    border-radius: 12px;
    background: linear-gradient(var(--ds-accent-soft, #F3EEFC), var(--ds-accent-soft, #F3EEFC)), var(--ds-surface, #FCFCFD);
}

.jo-mq-strip p { margin: 0; }
.jo-mq-l1 { display: flex; align-items: baseline; gap: 10px; }
.jo-mq-l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mq-l1 .jo-cell-status { flex: none; font-size: 12.5px; }
.jo-mq-total { flex: none; font-size: 15.5px; font-weight: 600; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; }
.jo-mq-l2 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 2px !important; font-size: 13px; line-height: 1.35; color: var(--ds-text-secondary, #3F3F46); }
.jo-mq-l2 .jo-cell-status { font-size: 12.5px; }
.jo-mq-l2 .is-warning { color: var(--jo-ui-warn); }
.jo-mq-strip .is-danger { color: var(--jo-ui-danger); }
.jo-mq-strip .is-ok { color: var(--jo-ui-ok); }

/* Schede (owner 20-ott-2026: tutto in una schermata, niente che si apre). */
.jo-mq-card { gap: 10px; }
.jo-mq-card .jo-m-sec { gap: 6px; }

/* Riga bassa di icone: contatti a sinistra, azioni secondarie a destra. */
.jo-mq-bar2 { display: flex; align-items: center; gap: 4px; min-height: 40px; }
.jo-mq-ct.jo-icon-btn { border: 1px solid var(--ds-border, #DFE2EA); background: var(--ds-surface, #FCFCFD); color: var(--ds-accent, #7C5CCB); }
.jo-mq-icons { display: flex; gap: 2px; margin-left: auto; }
a.jo-mq-tool, button.jo-mq-tool { display: grid; place-items: center; }

/* Azione principale: una sola, piena, a tutta larghezza. */
.jo-mq-main { display: flex; }
.jo-mq-main > *, .jo-mq-main .fi-btn { flex: 1; width: 100%; justify-content: center; }

.jo-mq-hint { display: flex; gap: 8px; margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mq-hint svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* Dati utili: griglia compatta a due colonne di coppie etichetta/valore piccole. */
.jo-mq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0; padding: 0 2px; }
.jo-mq-grid > div { min-width: 0; }
.jo-mq-grid > .is-wide { grid-column: 1 / -1; }
.jo-mq-grid dt { font-size: 11px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mq-grid dd { margin: 0; font-size: 13px; line-height: 1.35; color: var(--ds-text-primary, #18181B); overflow-wrap: anywhere; }

/* Preventivi della richiesta: righe compatte già complete, azioni a icone. */
.jo-mq-qlist { margin: 0; padding: 0; list-style: none; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 12px; background: var(--ds-surface, #FCFCFD); }
.jo-mq-qrow { padding: 8px 6px 4px 12px; }
.jo-mq-qrow + .jo-mq-qrow { border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }
.jo-mq-qrow-l1 { display: flex; align-items: baseline; gap: 10px; margin: 0; padding-right: 6px; }
.jo-mq-qrow-l1 b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mq-qrow-l1 .jo-cell-status { font-size: 12.5px; }
.jo-mq-qrow-l1 .jo-mq-total { margin-left: auto; font-size: 14px; }
.jo-mq-qrow-l2 { display: flex; align-items: center; gap: 6px; }
.jo-mq-qrow-meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ds-text-placeholder, #6B6B7B); }

/* Soluzioni: titolo, etichetta · date · ospiti; il prezzo a destra. */
.jo-mq-sols { padding: 0 12px !important; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 12px; background: var(--ds-surface, #FCFCFD); }

.jo-mq-sols { margin: 0; padding: 0; list-style: none; }
.jo-mq-sols li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.jo-mq-sols li + li { border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }
.jo-mq-sol-t { flex: 1; min-width: 0; }
.jo-mq-sol-t b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mq-sol-t small { display: block; margin-top: 1px; font-size: 12px; color: var(--ds-text-placeholder, #6B6B7B); }
.jo-mq-sol-t em { font-style: normal; font-weight: 600; color: var(--ds-accent-fg, #5F45A8); }
.jo-mq-price { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-align: right; }
.jo-mq-price b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; }
.jo-mq-price small { font-size: 11.5px; color: var(--ds-text-placeholder, #6B6B7B); }
.jo-mq-none { margin: 0; padding: 8px 0; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }

/* Righe degli elenchi: icona prima della nota (sorgente). */
.jo-mq-ni { display: inline-grid; vertical-align: -3px; margin-right: 4px; }
.jo-mq-ni svg { width: 14px; height: 14px; }

/* Le scelte in testa a una lista (Pipeline lead, owner 30-ott-2026): il
   controllo segmentato dell'iPhone come il periodo della Home, col numero. */
.jo-mseg { display: flex; flex: 1; min-width: 0; padding: 2px; border-radius: 12px; background: color-mix(in srgb, var(--ds-text-primary, #18181B) 7%, transparent); }
.jo-mseg button { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 32px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--ds-text-secondary, #3F3F46); cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.jo-mseg button span { overflow: hidden; text-overflow: ellipsis; }
.jo-mseg button b { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mseg button[aria-pressed='true'] { background: var(--ds-surface, #FCFCFD); font-weight: 600; color: var(--ds-accent-fg, #5F45A8); box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 1px 2px rgb(0 0 0 / .06); }
.jo-mseg button[aria-pressed='true'] b { color: inherit; }
html.dark .jo-mseg button[aria-pressed='true'] { background: color-mix(in srgb, var(--ds-text-primary, #ECECF1) 18%, var(--ds-surface, #121214)); }

/* Gruppi di una lista (Questa settimana, Aspettano da più di 7 giorni): titolo e numero sopra il riquadro. */
.jo-mq-grp { display: flex; justify-content: space-between; gap: 8px; margin: 4px 4px -4px; font-size: 12.5px; font-weight: 600; color: var(--ds-text-secondary, #3F3F46); }
.jo-mq-grp b { font-weight: 600; font-variant-numeric: tabular-nums; }
.jo-mq-grp.is-danger { color: var(--jo-ui-danger); }
.jo-mq-row .jo-m-txt small.jo-mq-note.is-danger { font-weight: 600; color: var(--jo-ui-danger); }
.jo-mq-row .jo-m-av { margin-top: 1px; }
/* Il cerchio col suo tono (il voto di un feedback: rosso, arancio, verde), coi colori di stato del design system. */
.jo-m-av.is-danger { background: var(--ds-err-bg, #FDECEC); color: var(--ds-err-fg, #A11A1A); }
.jo-m-av.is-warning { background: var(--ds-warn-bg, #FEF3E2); color: var(--ds-warn-fg, #8A4B00); }
.jo-m-av.is-success { background: var(--ds-ok-bg, #E7F6EE); color: var(--ds-ok-fg, #0B6B3A); }
.jo-mq-inst.jo-cell-status { display: inline-flex; margin-right: 6px; font-size: inherit; font-weight: 500; }

/* Chiama · WhatsApp dalla riga, accanto al link: tondi tenui, 36px a portata di pollice. */
.jo-mq-qa.jo-icon-btn { display: grid; flex: none; place-items: center; width: 36px; height: 36px; margin-left: 4px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent, #7C5CCB); }
.jo-mq-qa svg { width: 17px; height: 17px; }
.jo-mq-qa:last-child { margin-right: 4px; }

/* Quando e in quanti (Richieste dai form): una riga con l'icona, sotto il messaggio. */
.jo-mq-row .jo-m-txt small.jo-mq-stay { display: flex; align-items: center; gap: 5px; min-width: 0; font-weight: 600; color: var(--ds-text-secondary, #3F3F46); }
.jo-mq-stay span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mq-stay svg { flex: none; width: 14px; height: 14px; color: var(--ds-accent, #7C5CCB); }

/* Nota scritta nella scheda lead: il campo e l'invio, sempre in vista. */
.jo-mq-note-form { display: flex; align-items: flex-end; gap: 6px; }
.jo-mq-note-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 9px 12px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 10px; background: var(--ds-field-bg, #FEFEFF); font: inherit; font-size: 16px; color: var(--ds-text-primary, #18181B); resize: vertical; }
.jo-mq-note-form textarea:focus { outline: none; border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 3px var(--ds-field-focus-halo, rgba(124, 92, 203, .15)); }

/* === Schede di un contatto (owner 30-ott-2026, come i Contatti dell'iPhone) ===
   Pipeline lead e Richieste dai form: testata centrata con le iniziali
   grandi, quattro tasti in tessera, la domanda dopo il contatto
   (mobile/contact-head); riquadri sulla card (Cosa chiede, A che punto è,
   Attività, Dal form). */
.jo-mcard-head { display: flex; flex-direction: column; gap: 10px; }
.jo-mcard-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 2px; text-align: center; }
.jo-mcard-av { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent-fg, #5F45A8); font-size: 18px; font-weight: 700; }
.jo-mcard-hero h2 { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--ds-text-primary, #18181B); }
.jo-mcard-hero p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ds-text-secondary, #3F3F46); }
.jo-mcard-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.jo-mcard-meta .is-danger { font-weight: 600; color: var(--jo-ui-danger); }

.jo-mcard-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.jo-mcard-acts a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 7px 4px 6px; border-radius: 14px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-rest, 0 1px 2px rgb(0 0 0 / .06)); font-size: 11.5px; font-weight: 600; color: var(--ds-accent-fg, #5F45A8); -webkit-tap-highlight-color: transparent; }
.jo-mcard-acts a:active { transform: scale(.97); }
.jo-mcard-acts svg { width: 19px; height: 19px; color: var(--ds-accent, #7C5CCB); }
.jo-mcard-acts span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Quattro tasti (c'è Conversazione): scritte più strette, perché stiano intere a 390px. */
.jo-mcard-acts:has(> a:nth-child(4)) { gap: 6px; }
.jo-mcard-acts:has(> a:nth-child(4)) a { padding-inline: 1px; font-size: 11px; letter-spacing: -.02em; }

.jo-mcard-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--ds-accent, #7C5CCB) 28%, var(--ds-border, #DFE2EA)); border-radius: 14px; background: var(--ds-accent-soft, #F3EEFC); }
.jo-mcard-ask b { flex: 1 1 100%; font-size: 14px; color: var(--ds-text-primary, #18181B); }
.jo-mcard-ask button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.jo-mcard-yes { background: var(--ds-accent, #7C5CCB); color: var(--ds-on-accent, #FFF); }
.jo-mcard-no { background: transparent; color: var(--ds-accent-fg, #5F45A8); }

.jo-mcard-box { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-rest, 0 1px 2px rgb(0 0 0 / .06)); }
.jo-mcard-box h3 { margin: 0; font-size: var(--ds-fs-h4); font-weight: 700; color: var(--ds-accent-fg, #5F45A8); }
/* Il titolo sopra il riquadro, piccolo e maiuscolo, come Contatti dell'iPhone (owner 12-nov-2026, proposta B). */
.jo-m .jo-mcard-box:has(> h3) { position: relative; margin-top: 22px; }
.jo-m .jo-mcard-box > h3 { position: absolute; top: -21px; left: 6px; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mcard-quote { margin: 0; font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; color: var(--ds-text-primary, #18181B); }
.jo-mcard-muted { margin: 0; font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }

.jo-mcard-who { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 2px; border: 0; background: none; font: inherit; font-size: 13.5px; text-align: left; color: var(--ds-text-secondary, #3F3F46); cursor: pointer; }
.jo-mcard-who > svg { flex: none; width: 18px; height: 18px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mcard-who span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mcard-who b { font-weight: 600; color: var(--ds-text-primary, #18181B); }

.jo-mcard-tl { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.jo-mcard-tl li { position: relative; display: flex; flex-direction: column; gap: 1px; padding-left: 16px; font-size: 13px; line-height: 1.35; }
.jo-mcard-tl li::before { content: ""; position: absolute; left: 1px; top: 5px; width: 8px; height: 8px; border-radius: 999px; background: var(--ds-accent, #7C5CCB); }
.jo-mcard-tl li + li::after { content: ""; position: absolute; left: 4.5px; top: -9px; height: 13px; border-left: 1px solid var(--ds-border, #DFE2EA); }
.jo-mcard-tl b { font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mcard-tl span { white-space: pre-line; overflow-wrap: anywhere; color: var(--ds-text-secondary, #3F3F46); }
.jo-mcard-tl small { font-size: 11.5px; color: var(--ds-text-tertiary, #5B5B6B); }

/* Dal form: etichetta a sinistra e valore a destra, un filetto fra le righe; i testi lunghi sotto l'etichetta. */
.jo-mcard-kv { display: flex; flex-direction: column; margin: 0; }
.jo-mcard-kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }
.jo-mcard-kv > div:first-child { padding-top: 0; border-top: 0; }
.jo-mcard-kv > div.is-long { flex-direction: column; align-items: stretch; gap: 2px; }
/* Un'etichetta lunga (spesso una domanda scritta dall'hotel) va a capo e lascia spazio al valore. */
.jo-mcard-kv dt { flex: 0 1 auto; min-width: 0; max-width: 55%; overflow-wrap: break-word; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mcard-kv > div.is-long dt { max-width: none; }
.jo-mcard-kv dd { min-width: 0; margin: 0; font-size: 13.5px; font-weight: 500; text-align: right; overflow-wrap: anywhere; color: var(--ds-text-primary, #18181B); }
.jo-mcard-kv > div.is-long dd { text-align: left; white-space: pre-line; }

/* Cosa chiede (Richieste dai form): periodo con le notti e persone, etichette neutre con l'icona. */
.jo-mcard-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.jo-mcard-chips > span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); font-size: 12.5px; font-weight: 600; color: var(--ds-text-secondary, #3F3F46); }
.jo-mcard-chips svg { flex: none; width: 14px; height: 14px; color: var(--ds-accent, #7C5CCB); }

/* Fra i lead: una riga che apre la scheda lead del contatto. */
.jo-mcard-link { flex-direction: row; align-items: center; gap: 12px; color: inherit; -webkit-tap-highlight-color: transparent; }
.jo-mcard-link:active { background: var(--ds-surface-hover, #ECEEF3); }
.jo-mcard-link-ic { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent, #7C5CCB); }
.jo-mcard-link-ic svg { width: 18px; height: 18px; }
.jo-mcard-link-t { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.jo-mcard-link-t b { font-size: 14px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mcard-link-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mcard-link > svg { flex: none; width: 16px; height: 16px; color: var(--ds-text-tertiary, #5B5B6B); }

.jo-mq-grid > .is-wide dd { white-space: pre-line; }

/* === Home mobile a widget (20-ott-2026) ===
 * Le tre Home dell'app (Console, Andamento di un hotel, Home del
 * proprietario): periodo in testa come una riga che scorre, tocchi da 40px;
 * ogni widget con titolo e una riga che dice periodo e di chi; il foglio
 * "Modifica widget" che sale dal basso (mobile/widget-sheet, joMWidgets). */
.jo-mw-period { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jo-mw-period .jo-period { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
/* Periodo e matita sulla stessa riga (owner 30-ott-2026); il periodo è il
   controllo segmentato dell'iPhone (blocco "Periodo sul telefono" più sotto). */
.jo-mw-period-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.jo-mw-period-row .jo-period { flex: 1; min-width: 0; }
.jo-mw-edit { display: grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ds-text-primary, #18181B) 7%, transparent); color: var(--ds-text-secondary, #3F3F46); }
.jo-mw-edit svg { width: 19px; height: 19px; }
.jo-mw-edit:active { transform: scale(.94); }
.jo-mw-note { margin: 0 2px; font-size: 12.5px; color: var(--ds-text-placeholder, #6B6B7B); }

.jo-mw-w { border-radius: 14px; transition: box-shadow .3s, background-color .3s; -webkit-touch-callout: none; }
/* Il widget appena aggiunto: bordo viola che pulsa due volte, sopra il disegno della tessera. */
html .jo-mw-cell > .jo-mw-w.is-glow { box-shadow: 0 0 0 2px var(--ds-accent, #7400FF) !important; background: var(--ds-accent-soft, #F1EAFD); }
html .jo-mw:not(.is-editing) .jo-mw-cell > .jo-mw-w.is-glow { outline: 2px solid transparent; animation: jo-mw-glow 1.1s ease-out 2; }
@keyframes jo-mw-glow { from { outline-color: var(--ds-accent, #7400FF); outline-offset: 0; } to { outline-color: transparent; outline-offset: 10px; } }
.jo-mw-head { display: flex; flex-direction: column; gap: 1px; margin: 0 2px; }
.jo-mw-head .jo-m-h { margin: 0; font-size: 14px; color: var(--ds-text-primary, #18181B); }
.jo-mw-sub { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ds-text-placeholder, #6B6B7B); }
.jo-mw-w .jo-m-kpis { margin: 0; }
.jo-mw-empty { flex-wrap: wrap; }

/* Foglio dal basso, sopra la barra delle tab e sotto le notifiche ("Annulla"). */
html.jo-msheet-open, html.jo-msheet-open body { overflow: hidden; }
/* Il widget tolto col «−» sfuma come sul computer, poi se ne va (owner 18-nov-2026; joMWidgets.hide). */
.jo-mw-cell.is-hiding { opacity: 0; pointer-events: none; transition: opacity calc(var(--ds-motion-slow) * 2) var(--ds-ease-std); }
@media (prefers-reduced-motion: reduce) { .jo-mw-cell.is-hiding { transition: none; } }

/* Il velo unico della piattaforma, come sul computer (owner 18-nov-2026: prima scuriva al 42%). */
.jo-msheet-veil { position: fixed; inset: 0; z-index: 46; background: var(--ds-focus-veil); }
.jo-msheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 47;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    height: 78dvh;
    margin-inline: auto;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: var(--ds-surface, #FCFCFD);
    box-shadow: 0 -10px 40px rgb(15 15 25 / .18);
    transition: height .25s ease, transform .2s ease;
    padding-bottom: env(safe-area-inset-bottom);
}
.jo-msheet.is-full { height: calc(100dvh - 24px); }
.jo-msheet.is-dragging { transition: none; }
.jo-msheet-slide { transition: transform .25s ease; }
.jo-msheet-down { transform: translateY(100%); }
.jo-msheet-up { transform: translateY(0); }
.jo-msheet-fade { transition: opacity .2s ease; }
.jo-msheet-fade-0 { opacity: 0; }
.jo-msheet-fade-1 { opacity: 1; }
.jo-msheet-top { flex: none; padding: 0 12px 8px; border-bottom: 1px solid var(--ds-border, #DFE2EA); touch-action: none; cursor: grab; }
.jo-msheet-handle { display: flex; justify-content: center; width: 100%; height: 22px; padding: 8px 0 0; border: 0; background: none; cursor: grab; }
.jo-msheet-handle span { width: 40px; height: 5px; border-radius: 999px; background: var(--ds-border-strong, #C9CDD8); }
.jo-msheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 24px; }
/* Etichette dei numeri intere su due righe, mai troncate ("Preventivi inviati"). */
.jo-mw-w .jo-kpi-lbl { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
.jo-mw-w .jo-kpi-note.jo-m-delta { font-size: 12px; font-weight: 600; }
.jo-mw-group { margin: 4px 2px 0; font-size: 12.5px; font-weight: 600; color: var(--ds-text-tertiary, #5B5B6B); }


/* Nella tessera il nome sta sotto: la testata del widget non si ripete. */

/* Widget a numero singolo (owner 20-ott-2026): nella Home 2-3 per riga. */
.jo-mw-w--number { gap: 0; }
.jo-mw-num { position: relative; display: flex; min-width: 0; height: 100%; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 12px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-rest, none); color: inherit; text-decoration: none; }
.jo-mw-num-top { display: block; min-width: 0; }
/* L'icona in basso a destra: il nome ha tutta la riga e non si taglia. */
.jo-mw-num-top .jo-kpi-ic { position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 7px; }
.jo-mw-num-top .jo-kpi-ic svg { width: 14px; height: 14px; }
.jo-mw-num-t { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.2; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mw-num-v { font-size: 21px; font-weight: 600; line-height: 1.15; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; }
.jo-mw-num-v small { font-size: 12px; font-weight: 600; }
.jo-mw-num-s { font-size: 11.5px; color: var(--ds-text-placeholder, #6B6B7B); }

/* Grafici a barre orizzontali (~30px per categoria), nello stesso riquadro degli elenchi. */
.jo-mw-bars { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; }
.jo-mw-bar { display: grid; grid-template-columns: auto minmax(0, 8.5rem) 1fr auto auto; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; }
.jo-mw-bar:not(:has(.jo-bks-logo)) { grid-template-columns: minmax(0, 8.5rem) 1fr auto auto; }
.jo-mw-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text-secondary, #3F3F46); }
.jo-mw-bar-track { height: 8px; overflow: hidden; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); }
.jo-mw-bar-track > i { display: block; height: 100%; border-radius: inherit; background: var(--ds-accent, #7145D9); opacity: .75; }
.jo-mw-bar-n { font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); }
.jo-mw-bar-pct { min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ds-text-tertiary, #5B5B6B); }
/* Personalizzazione stile iPhone (cliente 29-ott-2026, HasMobileWidgetBoard):
   in modifica i widget tremano, "−" in alto a sinistra li toglie, tenuti
   premuti si trascinano; in alto "+ Aggiungi" e "Fine".
   Widget affiancati quando c'è spazio, come la dashboard del computer (owner
   30-ott-2026): ognuno ha una larghezza minima (numero ~1/3 della riga,
   riepilogo ~1/2, il resto tutta) e cresce fino a riempire la riga; rimasto
   solo, la prende tutta. Su uno schermo più largo ne stanno di più, e
   dentro ogni widget si adatta alla larghezza che ha (container query). */
.jo-mw-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.jo-mw-cell { position: relative; flex: 1 1 100%; min-width: 0; container-type: inline-size; }
.jo-mw-cell--small { flex-basis: 104px; }
.jo-mw-cell--half { flex-basis: 160px; }
@media (min-width: 700px) {
    .jo-mw-cell--full { flex-basis: 320px; }
}
.jo-mw-cell > .jo-mw-w { height: 100%; }
/* Numeri dentro un widget: tessere che si dividono la riga; una cifra lunga
   ("€ 1.234.567") allarga la sua tessera e, se non ci stanno tutte, l'ultima
   va a capo: mai fuori dal bordo né sopra un'altra scritta. La "i" accanto al
   nome no, come nei widget a numero singolo. */
html body .jo-mw-w .jo-kpis.jo-m-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.jo-mw-w .jo-m-kpis > .jo-kpi { flex: 1 1 0; min-width: min-content; }
.jo-mw-w .jo-m-kpis .jo-kpi-val { white-space: nowrap; }
html body .jo-mw-w .jo-m-kpis .jo-kpi > .jo-kpi-note { flex: 0 1 auto; min-width: 0; }
.jo-mw-w .jo-m-kpis .jo-info { display: none; }
/* Widget stretto (a metà riga): i numeri uno sotto l'altro, senza tessere
   dentro la tessera; nome a sinistra e numero a destra, e se non ci stanno
   il numero va sotto, sempre a destra. */
@container (max-width: 299px) {
    html body .jo-mw-w .jo-kpis.jo-m-kpis { flex-direction: column; }
    .jo-mw-w .jo-m-kpis > .jo-kpi { flex: none; }
    html body .jo-mw-cell .jo-mw-w .jo-m-kpis .jo-kpi { justify-content: flex-end; align-items: baseline !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
    html body .jo-mw-w .jo-m-kpis .jo-kpi::before { content: none !important; }
    .jo-mw-w .jo-m-kpis .jo-kpi > .jo-kpi-top { flex: 1 1 50%; min-width: min-content; }
    html body .jo-mw-w .jo-m-kpis .jo-kpi-lbl { font-size: 12.5px !important; color: var(--ds-text-secondary, #3F3F46); }
    html body .jo-mw-w .jo-m-kpis .jo-kpi-val { flex: none; font-size: 17px !important; }
    html body .jo-mw-w .jo-m-kpis .jo-kpi > .jo-kpi-note { flex: none; font-size: 11px !important; }
}

/* Ogni widget è una tessera, come sull'iPhone: angoli tondi, titolo dentro,
   niente riquadro dentro il riquadro; il "−" sta sull'angolo della tessera. */
.jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number) { gap: 8px; padding: 12px 14px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 20px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-rest, none); }
.jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number) .jo-mw-head { margin: 0; }
.jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number) .jo-m-list { border: 0; border-radius: 0; background: none; box-shadow: none; }
.jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number) .jo-m-row { padding-left: 0; }
/* Tessera a numero compatta: nome, numero, variazione (sotto se non ci sta), periodo; niente icona. */
.jo-mw-cell .jo-mw-num,
.jo-mgal-preview .jo-mw-num { gap: 2px; padding: 12px 12px 10px; border-radius: 18px; }
.jo-mw-cell .jo-mw-num-top .jo-kpi-ic,
.jo-mgal-preview .jo-mw-num-top .jo-kpi-ic { display: none; }
.jo-mw-cell .jo-mw-num-t,
.jo-mgal-preview .jo-mw-num-t { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.jo-mw-cell .jo-mw-num-v,
.jo-mgal-preview .jo-mw-num-v { display: flex; flex-direction: column; align-items: flex-start; gap: 0; font-size: 19px; }
/* Tutte uguali: la variazione sempre sotto il numero, niente "i" accanto al nome. */
.jo-mw-cell .jo-mw-num .jo-info,
.jo-mgal-preview .jo-mw-num .jo-info { display: none; }
.jo-mw-cell .jo-mw-num-v small { font-size: 11px; }
.jo-mw-cell .jo-mw-num-s,
.jo-mgal-preview .jo-mw-num-s { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.jo-mgal-preview .jo-mw-w:not(.jo-mw-w--number) { gap: 8px; padding: 12px 14px; background: var(--ds-surface, #FCFCFD); }
.jo-mgal-preview .jo-m-list { border: 0; border-radius: 0; background: none; box-shadow: none; }

.jo-mw-editbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: -4px 0 2px; padding: 8px 0; background: var(--ds-bg-app); }
.jo-mw-editbar-add { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ds-accent, #7400FF); font-size: 14px; font-weight: 600; color: #fff; }
.jo-mw-editbar-add svg { width: 18px; height: 18px; }
.jo-mw-editbar-hint { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mw-editbar-done { min-height: 40px; padding: 0 14px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 999px; background: var(--ds-surface, #FCFCFD); font-size: 14px; font-weight: 600; color: var(--ds-accent-fg, #5E00D6); }

.jo-mw.is-editing .jo-mw-cell { touch-action: none; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.jo-mw.is-editing .jo-mw-cell > .jo-mw-w { pointer-events: none; animation: jo-mw-jiggle .32s ease-in-out infinite alternate; }
.jo-mw.is-editing .jo-mw-cell:nth-child(2n) > .jo-mw-w { animation-delay: -.16s; }
/* Spostamento chiaro (owner 30-ott-2026): il widget preso si solleva col
   bordo viola e segue il dito (dashboard-widgets.js); il posto dove entrerà
   resta segnato, tratteggiato; gli altri si attenuano e scivolano al loro
   posto nuovo. Lasciato, scivola nel posto segnato (is-settling). */
.jo-mw-cell.is-sorting { z-index: 3; border-radius: 22px; outline: 2px dashed var(--ds-accent, #7400FF); outline-offset: -2px; background: var(--ds-accent-soft, #F3EEFC); }
html .jo-mw.is-editing .jo-mw-cell.is-sorting > .jo-mw-w { animation: none; box-shadow: 0 14px 30px rgb(20 22 40 / .22), 0 0 0 2px var(--ds-accent, #7400FF) !important; }
.jo-mw-grid.is-sorting .jo-mw-remove { visibility: hidden; }
.jo-mw-grid.is-sorting .jo-mw-cell:not(.is-sorting) > .jo-mw-w { opacity: .55; transition: opacity .15s; }
html .jo-mw.is-editing .jo-mw-cell.is-settling > .jo-mw-w { animation: none; }
@keyframes jo-mw-jiggle { from { transform: rotate(-.5deg); } to { transform: rotate(.5deg); } }
@media (prefers-reduced-motion: reduce) { .jo-mw.is-editing .jo-mw-cell > .jo-mw-w { animation: none; outline: 2px dashed var(--ds-accent-light, #E5DAFB); } }

.jo-mw-remove { position: absolute; top: -9px; left: -9px; z-index: 4; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 2px solid var(--ds-surface, #FCFCFD); border-radius: 999px; background: var(--ds-text-secondary, #3F3F46); color: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }
.jo-mw-remove svg { width: 16px; height: 16px; }

/* Foglio "Aggiungi un widget" come la galleria dell'iPhone (owner 30-ott-2026,
   mobile/widget-sheet): ricerca a capsula grigia, Suggeriti a scorrimento,
   elenco delle aree a righe raggruppate; un'area = i suoi widget uno alla
   volta (scroll-snap) coi pallini e "Aggiungi widget" a capsula viola. */
.jo-mgal-top { border-bottom: 0; padding-bottom: 4px; }
.jo-mgal-bar { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.jo-mgal-search { display: flex; flex: 1; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-radius: 12px; background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-placeholder, #6B6B7B); }
.jo-mgal-search svg { width: 17px; height: 17px; flex: none; }
.jo-mgal-search input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 16px; color: var(--ds-text-primary, #18181B); outline: none; box-shadow: none; }
.jo-mgal-title { flex: 1; min-width: 0; overflow: hidden; font-size: 17px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text-primary, #18181B); }
.jo-mgal-back, .jo-mgal-close { display: grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-secondary, #3F3F46); }
.jo-mgal-back svg, .jo-mgal-close svg { width: 18px; height: 18px; }
.jo-mgal-body { padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.jo-mgal-h { margin: 14px 4px 8px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ds-text-primary, #18181B); }
.jo-mgal-h:first-child { margin-top: 6px; }

/* Suggeriti: due per riga, miniature tutte alte uguali e nomi in fila
   (owner 30-ott-2026: niente vuoti). Un widget intero in miniatura (zoom),
   sfumato in fondo; un numero singolo riempie la sua, al centro. */
.jo-mgal-feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.jo-mgal-feat-item { display: flex; min-width: 0; flex-direction: column; gap: 7px; padding: 0; border: 0; background: none; text-align: left; }
.jo-mgal-feat-item:active .jo-mgal-preview { transform: scale(.97); }
.jo-mgal-feat-item .jo-mgal-preview { height: 132px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 18px; background: var(--ds-surface, #FCFCFD); box-shadow: none; -webkit-mask-image: linear-gradient(#000 84%, transparent); mask-image: linear-gradient(#000 84%, transparent); }
.jo-mgal-feat-item .jo-mgal-preview > * { zoom: .5; }
.jo-mgal-feat-item .jo-mgal-preview--small { -webkit-mask-image: none; mask-image: none; }
.jo-mgal-feat-item .jo-mgal-preview--small > * { height: 100%; zoom: 1; }
.jo-mgal-feat-item .jo-mgal-preview--small .jo-mw-num { justify-content: center; height: 100%; padding: 12px 14px; border: 0; border-radius: 0; box-shadow: none; }
.jo-mgal-feat-item .jo-mgal-name { padding: 0 2px; }
.jo-mgal-feat-item .jo-mgal-name b,
.jo-mgal-feat-item .jo-mgal-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mgal-name { display: flex; flex-direction: column; gap: 1px; padding: 0 4px; }
.jo-mgal-name b { font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--ds-text-primary, #18181B); }
.jo-mgal-name small { font-size: 12.5px; line-height: 1.3; color: var(--ds-text-tertiary, #5B5B6B); }

.jo-mgal-areas, .jo-mgal-results { margin: 0; padding: 0; overflow: hidden; border-radius: 16px; background: var(--ds-surface, #FCFCFD); box-shadow: 0 0 0 1px var(--ds-border, #DFE2EA); list-style: none; }
.jo-mgal-areas li, .jo-mgal-results li { position: relative; }
/* Il filetto parte dopo l'icona, come nelle liste dell'iPhone. */
.jo-mgal-areas li + li::before, .jo-mgal-results li + li::before { content: ''; position: absolute; top: 0; right: 0; left: 56px; height: 1px; background: var(--ds-border, #DFE2EA); }
.jo-mgal-area, .jo-mgal-res { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; border: 0; background: none; text-align: left; }
.jo-mgal-area:active, .jo-mgal-res:active { background: var(--ds-surface-hover, #ECEEF3); }
.jo-mgal-area-ic { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ds-accent, #7400FF); color: #fff; }
.jo-mgal-area-ic svg { width: 18px; height: 18px; }
.jo-mgal-area-t { flex: 1; min-width: 0; font-size: 16px; color: var(--ds-text-primary, #18181B); }
.jo-mgal-area-n { font-size: 15px; color: var(--ds-text-placeholder, #6B6B7B); font-variant-numeric: tabular-nums; }
.jo-mgal-area-go { flex: none; width: 18px; height: 18px; color: var(--ds-text-disabled, #8A8A99); }
.jo-mgal-res-t { display: flex; flex: 1; min-width: 0; flex-direction: column; padding: 8px 0; }
.jo-mgal-res-t b, .jo-mgal-res-t small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mgal-res-t b { font-size: 15px; font-weight: 500; color: var(--ds-text-primary, #18181B); }
.jo-mgal-res-t small { font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgal-res-add { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent-fg, #5F45A8); }
.jo-mgal-res-add svg { width: 18px; height: 18px; }
.jo-mgal-reset { display: block; width: 100%; margin-top: 18px; padding: 12px; border: 0; border-radius: 14px; background: var(--ds-surface, #FCFCFD); box-shadow: 0 0 0 1px var(--ds-border, #DFE2EA); font-size: 15px; color: var(--ds-accent-fg, #5F45A8); }

/* Un'area (owner 30-ott-2026): nome e cosa mostra sopra, l'anteprima larga
   come nella Home (stessi grafici), tutto al centro dello spazio; i pallini
   sotto e "Aggiungi widget" in fondo al foglio. */
/* Aperta un'area il foglio è alto quanto serve: niente vuoti sopra e sotto. */
.jo-msheet.jo-mgal.is-cat { height: auto; max-height: calc(100dvh - 24px); }
.jo-mgal.is-cat .jo-msheet-body { flex: 0 1 auto; }
.jo-mgal-pages { display: flex; flex-direction: column; }
.jo-mgal-track { display: flex; align-items: stretch; margin: 0 -16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.jo-mgal-track::-webkit-scrollbar { display: none; }
.jo-mgal-page { display: flex; flex: 0 0 100%; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; padding: 4px 16px 6px; scroll-snap-align: center; scroll-snap-stop: always; }
/* Tutte le pagine alte uguali (owner 30-ott-2026): nome e descrizione su una
   riga, l'anteprima in uno spazio fisso, al centro (joMWidgets.fitStage la
   rimpicciolisce se non ci sta). */
.jo-mgal-page-t { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; text-align: center; color: var(--ds-text-primary, #18181B); }
.jo-mgal-page-s { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 4px 0 16px; font-size: 15px; line-height: 1.35; text-align: center; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgal-stage { display: flex; align-items: center; justify-content: center; width: 100%; height: clamp(200px, 40dvh, 360px); }
.jo-mgal-page .jo-mgal-preview { width: 100%; }
/* Un numero singolo un po' più grande che nella Home, al centro. */
.jo-mgal-page .jo-mgal-preview--small { width: 48%; }
.jo-mgal-page .jo-mgal-preview--small > * { zoom: 1.15; }
.jo-mgal-dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 0; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgal-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--ds-border-strong, #C9CDD8); transition: background .2s; }
.jo-mgal-dots i.is-on { background: var(--ds-text-primary, #18181B); }
.jo-mgal-add { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; align-self: stretch; min-height: 50px; margin: 20px 0 0; padding: 0 26px; border: 0; border-radius: 999px; background: var(--ds-accent, #7400FF); font-size: 16px; font-weight: 600; color: #fff; }
.jo-mgal-add svg { width: 20px; height: 20px; }
.jo-mgal-add:active { transform: scale(.97); }
.jo-mgal-add.is-on-page { margin-bottom: 0; background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgal-add.is-on-page:active { transform: none; }

/* Tolto un widget: la capsula con "Annulla" sopra la barra in basso (owner 30-ott-2026). */
.jo-mw-undo { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--ds-text-primary, #18181B) 90%, transparent); color: var(--ds-surface, #FCFCFD); box-shadow: 0 8px 24px rgb(0 0 0 / .18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transform: translateX(-50%); font-size: 14px; }
.jo-mw-undo-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mw-undo button { flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ds-surface, #FCFCFD) 16%, transparent); font-size: 14px; font-weight: 600; color: var(--ds-accent-soft, #F3EEFC); }
.jo-mw-undo-in { transition: opacity .2s ease, transform .2s ease; }
.jo-mw-undo-0 { opacity: 0; transform: translate(-50%, 8px); }
.jo-mw-undo-1 { opacity: 1; transform: translate(-50%, 0); }
.jo-mgal-preview { display: block; overflow: hidden; border-radius: 20px; box-shadow: 0 0 0 1px var(--ds-border, #DFE2EA); pointer-events: none; }
.jo-mgal-preview .jo-mw-w { margin: 0; }
.jo-mgal-nodata { display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 14px; background: var(--ds-surface, #FCFCFD); font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgal-nodata svg { width: 20px; height: 20px; color: var(--ds-accent, #7400FF); }

/* Compositore del preventivo dal telefono: la richiesta associata ferma in
   alto copriva ~120px dei passi mentre si scorre; sul telefono scorre con la
   pagina (sul computer resta ferma). */
@media (max-width: 767px) {
    body.jo-quote-pilot:has(.jo-mtab) .jo-qh-req[data-jo-request-strip] { position: relative; top: auto; }
}

/* === App mobile = piattaforma desktop (20-ott-2026) ===
   Le tab usano i nomi delle voci del computer ("Preventivatore"): il tasto
   acceso non cambia peso, così il nome resta intero e non salta di larghezza. */
@media (max-width: 767px) {
    .jo-mtab-item.is-active { font-weight: 500; }
    .jo-mtab-lbl { letter-spacing: -0.01em; }
}

/* KPI sul telefono (cliente 29-ott-2026, Analytics): etichetta e nota vanno a
   capo invece dei puntini ("Campagne in…", "▼78% vs prim…"): sul telefono
   non c'è il tooltip a dirle per intero. */
@media (max-width: 639px) {
    html body .jo-kpi-lbl,
    html body .fi-wi-stats-overview-stat-label {
        overflow: visible !important;
        line-height: 1.25 !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }

    html body .jo-kpi-note,
    html body .fi-wi-stats-overview-stat-description {
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }
}

/* === Stile iPhone (owner 30-ott-2026) ===
   Sul telefono l'app prende il disegno di iOS: stessi blocchi, stesso
   ordine, cambia solo il disegno. Barra in basso sospesa, di vetro sfocato,
   col tasto acceso in una capsula; testata trasparente sfocata; titoli
   grandi; riquadri e widget più tondi e senza bordo; elenchi raggruppati coi
   filetti che partono dopo l'icona. Il periodo resta com'è (owner 15-ott). */
@media (max-width: 767px) {
    :root { --jo-mtab-space: calc(var(--jo-mtab-h) + 14px + env(safe-area-inset-bottom, 0px)); }

    .jo-mtab {
        inset: auto 10px calc(8px + env(safe-area-inset-bottom, 0px));
        height: var(--jo-mtab-h);
        padding: 5px;
        border: 1px solid color-mix(in srgb, var(--ds-border, #DFE2EA) 70%, transparent);
        border-radius: 32px;
        background: color-mix(in srgb, var(--ds-surface, #FCFCFD) 74%, transparent);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        backdrop-filter: blur(22px) saturate(180%);
        box-shadow: 0 10px 30px rgb(15 15 25 / .16), 0 1px 3px rgb(15 15 25 / .08);
    }
    .jo-mtab-item { justify-content: center; gap: 2px; border-radius: 26px; font-size: 10.5px; }
    .jo-mtab-ic { width: 32px; height: 26px; }
    .jo-mtab-item.is-active { background: color-mix(in srgb, var(--ds-accent, #7400FF) 12%, transparent); }
    .jo-mtab-item.is-active .jo-mtab-ic { background: none; }
    .jo-mtab-item:active { background: color-mix(in srgb, var(--ds-text-primary, #18181B) 6%, transparent); }
    .jo-mtab-item:active .jo-mtab-ic { background: none; }
    .jo-mtab-badge { left: calc(50% + 6px); border-color: var(--ds-surface, #FCFCFD); }

    body:has(.jo-mtab) .fi-topbar > nav {
        border-bottom: 1px solid color-mix(in srgb, var(--ds-border, #DFE2EA) 60%, transparent);
        /* !important: .bg-white è rimappato sulle card con !important (mai bianco puro). */
        background: color-mix(in srgb, var(--ds-bg-app, #EDEFF4) 78%, transparent) !important;
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        backdrop-filter: blur(22px) saturate(180%);
        box-shadow: none !important;
    }

    /* Testi e spazi più compatti (owner 2-nov-2026): titolo 22px, 12px fra i blocchi. */
    body:has(.jo-mtab) .fi-header-heading { font-size: 22px !important; font-weight: 700; letter-spacing: -.02em; line-height: 1.2 !important; }
    .fi-page:has(.jo-m, .jo-mw) > section { row-gap: 12px !important; }

    body:has(.jo-mtab) .jo-m-list { border-color: transparent; border-radius: 16px; box-shadow: none; }
    body:has(.jo-mtab) .jo-m-row { position: relative; }
    body:has(.jo-mtab) .jo-m-row + .jo-m-row { border-top: 0; }
    body:has(.jo-mtab) .jo-m-row + .jo-m-row::before { content: ''; position: absolute; top: 0; right: 0; left: 62px; height: 1px; background: var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }
    body:has(.jo-mtab) .jo-m-row + .jo-m-row:not(:has(.jo-m-ic, .jo-m-av))::before { left: 14px; }
    body:has(.jo-mtab) .jo-mw-cell .jo-m-row + .jo-m-row::before { left: 48px; }
    body:has(.jo-mtab) .jo-mw-cell .jo-m-row + .jo-m-row:not(:has(.jo-m-ic, .jo-m-av))::before { left: 0; }

    body:has(.jo-mtab) .jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number),
    body:has(.jo-mtab) .jo-mw-cell .jo-mw-num { border-color: transparent; border-radius: 22px; box-shadow: 0 1px 2px rgb(20 22 40 / .04); }

    body:has(.jo-mtab) .jo-msheet { border-radius: 28px 28px 0 0; }
}

/* === Periodo sul telefono (owner 30-ott-2026) ===
   Il controllo segmentato dell'iPhone al posto delle voci con la linea sotto
   (che restano sul computer, owner 15-ott): capsula grigia, voci di uguale
   larghezza, la scelta su una tessera chiara in rilievo col testo viola. */
@media (max-width: 767px) {
    /* Un filo fra i segmenti: la scelta («12 mesi») non tocca la voce accanto (5-nov-2026).
       Una voce non scende sotto la sua etichetta: con la capsula stretta (testata
       da 640 a 767px) «90 gg» e «12 mesi» si scrivevano attaccati (9-nov-2026). */
    body:has(.jo-mtab) .jo-period .jo-gd-seg { display: flex; gap: 2px; width: 100%; padding: 2px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ds-text-primary, #18181B) 7%, transparent); box-shadow: none; }
    body:has(.jo-mtab) .jo-period .jo-gd-seg button { flex: 1 1 0; justify-content: center; min-height: 32px; padding: 0 4px; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--ds-text-secondary, #3F3F46); transition: background-color .15s ease, box-shadow .15s ease; }
    body:has(.jo-mtab) .jo-period .jo-gd-seg button:hover { background: transparent; }
    body:has(.jo-mtab) .jo-period .jo-gd-seg button[aria-pressed='true'] { background: var(--ds-surface, #FCFCFD); font-weight: 600; color: var(--ds-accent-fg, #5F45A8); box-shadow: 0 3px 8px rgb(0 0 0 / .12), 0 1px 2px rgb(0 0 0 / .06); }
    html.dark body:has(.jo-mtab) .jo-period .jo-gd-seg button[aria-pressed='true'] { background: color-mix(in srgb, var(--ds-text-primary, #ECECF1) 18%, var(--ds-surface, #121214)); }
    body:has(.jo-mtab) .jo-period .jo-gd-seg button[aria-pressed='true']::after { display: none; }
    body:has(.jo-mtab) .jo-period .jo-gd-seg .jo-period-ic { width: 18px; height: 18px; }
}

/* === Altro come le impostazioni di un'app (owner 30-ott-2026, ispirato a Flo) ===
   In testa la scheda profilo (iniziali nel cerchio viola, nome, chi è ed
   email; il tocco apre "Il mio account"); sotto le voci a gruppi in schede,
   righe come le Impostazioni di iOS (owner 12-nov-2026, proposta 6 di «come
   iPhone e Mac»): l'icona viola su un tassello lilla tenue, un colore solo come
   le parti della Scheda hotel (11-nov), testo pieno, filetti dopo l'icona. */
.jo-more-profile { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px; border-radius: 18px; background: var(--ds-surface, #FCFCFD); color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.jo-more-profile:active { background: var(--ds-surface-hover, #ECEEF3); }
.jo-more-av { display: grid; flex: none; place-items: center; width: 58px; height: 58px; border-radius: 999px; background: var(--ds-accent, #7400FF); font-size: 21px; font-weight: 600; color: var(--ds-on-accent, #fff); }
.jo-more-who { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.jo-more-who b, .jo-more-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-more-who b { font-size: 19px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-more-who small { font-size: 14px; color: var(--ds-text-tertiary, #5B5B6B); }

html .jo-more .jo-m-ic.jo-kpi-ic { width: var(--ds-icon-tile, 32px); height: var(--ds-icon-tile, 32px); border-radius: 8px; background: var(--ds-accent-soft, #F4ECFF) !important; color: var(--ds-accent-fg, #5F45A8) !important; }
html .jo-more .jo-m-ic.jo-kpi-ic svg { width: var(--ds-icon-tile-svg, 17px); height: var(--ds-icon-tile-svg, 17px); }
.jo-more .jo-m-row-main { min-height: 58px; gap: 12px; }
.jo-more .jo-m-txt b { font-size: 16.5px; font-weight: 400; }
.jo-more .jo-m-val { font-weight: 500; color: var(--ds-text-tertiary, #5B5B6B); }
@media (max-width: 767px) {
    body:has(.jo-mtab) .jo-more .jo-m-row + .jo-m-row::before { left: 58px; }
}

/* === Indietro in alto a sinistra (owner 30-ott-2026) ===
   Sul telefono il posto in alto a sinistra della barra è la freccia Indietro,
   come il "‹" dell'iPhone (e come la freccia delle pagine di dettaglio sul
   computer): la freccia di schede e liste interne (.jo-backlink) sta lì, ferma
   mentre si scorre; nelle schermate dei tasti lì c'è la pillola dell'hotel
   per uscire («🏨 Joorna ×»). */
@media (max-width: 767px) {
    /* L'uscita dall'hotel è la pillola «🏨 Joorna ×» nelle schermate principali
       (owner 30-ott-2026); in quelle interne lì c'è la freccia Indietro. */
    body:has(.jo-mtab) .fi-topbar .jo-ctx .jo-ctx-exit { flex: none; width: auto; min-width: 0; height: 40px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent-fg, #5F45A8); }
    body:has(.jo-mtab) .fi-topbar .jo-ctx-exit .jo-ctx-exit-ic { display: none; }
    body:has(.jo-mtab) .fi-topbar .jo-ctx-exit .jo-ctx-exit-m { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: 14px; font-weight: 600; }
    /* Solo «🏨 ×» (owner 30-ott-2026): il nome sta nel tooltip e nella pagina, la ricerca ha lo spazio. */
    body:has(.jo-mtab) .fi-topbar .jo-ctx-exit .jo-ctx-exit-m > span { display: none; }
    body:has(.jo-mtab) .fi-topbar .jo-ctx-exit .jo-ctx-exit-m svg { flex: none; width: 16px; height: 16px; }
    body:has(.jo-mtab):has(.jo-m .jo-backlink) .fi-topbar .jo-ctx-exit { display: none !important; }
    body:has(.jo-mtab):has(.jo-m .jo-backlink) .fi-topbar > nav { padding-left: 60px; }
    body:has(.jo-mtab) .jo-m .jo-backlink {
        position: fixed;
        top: calc(12px + env(safe-area-inset-top, 0px));
        left: 10px;
        z-index: 30;
        width: 40px;
        height: 40px;
        margin: 0;
        border-radius: 999px;
        background: color-mix(in srgb, var(--ds-text-primary, #18181B) 7%, transparent);
        color: var(--ds-accent-fg, #5F45A8);
    }
    body:has(.jo-mtab) .jo-m .jo-backlink svg { width: 22px; height: 22px; }
}

/* === Home a righe (owner 30-ott-2026, proposta B scelta fra due) ===
   Come l'app Salute dell'iPhone: ogni widget è una riga in una tessera bianca
   con l'ombra che la stacca dal fondo; in alto il nome piccolo in viola, poi il
   numero grande con la variazione e gli altri numeri in breve, a destra il
   piccolo grafico dell'andamento quando c'è la sua serie. Tutti i widget a
   tutta riga; i numeri singoli restano affiancati. Più forte dello stile iPhone
   (body:has(.jo-mtab) …) con una classe in più, senza un altro body:has()
   (PanelCssSelectorsTest). Tema scuro dai token. */
html body .jo-mw .jo-mw-cell > .jo-mw-w:not(.jo-mw-w--number) {
    gap: 3px;
    padding: 10px 14px;
    border-radius: 18px;
    box-shadow: var(--ds-shadow-raised);
}
html body .jo-mw .jo-mw-cell > .jo-mw-w > .jo-mw-head { margin: 0; }
html body .jo-mw .jo-mw-cell > .jo-mw-w > .jo-mw-head .jo-m-h { font-size: 12.5px; font-weight: 700; color: var(--ds-accent-fg); }
.jo-mw-metric { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: end; }
.jo-mw-metric-v { grid-column: 1; font-size: 22px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ds-text-primary); }
.jo-mw-metric-l { grid-column: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--ds-text-secondary); }
.jo-mw-metric-l .jo-m-delta { font-weight: 700; }
.jo-mw-spark { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 72px; height: 30px; color: var(--ds-accent); }
html body .jo-mw .jo-mw-cell .jo-mw-num { box-shadow: var(--ds-shadow-raised); }

/* === Fondo più deciso nel tema chiaro del telefono (owner 30-ott-2026) ===
   "Troppo piatta; col tema scuro mi piace di più": nel tema scuro le schede
   risaltano sul nero, nel chiaro quasi bianche su grigio chiarissimo si
   confondevano. Sul telefono il fondo chiaro scende di un passo
   (--ds-bg-app-phone), le schede restano --ds-surface; tema scuro invariato. */
@media (max-width: 767px) {
    :root:not(.dark) { --ds-bg-app: var(--ds-bg-app-phone); }
}

/* === Avvisi: un riquadro per tipo (owner 30-ott-2026) ===
   Il nome del problema una volta sola con quanti sono, perché conta e cosa
   fare (sul fondo tenue della priorità), poi gli hotel uno per riga; l'icona
   del tipo nel colore della priorità. Stessa tessera bianca con l'ombra
   della Home. */
.jo-alert-group { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 18px; background: var(--ds-surface); box-shadow: var(--ds-shadow-raised); }
.jo-alert-group + .jo-alert-group { margin-top: 10px; }
.jo-alert-group-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
html .jo-alert-group-head .jo-m-ic.jo-kpi-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--jo-prio) !important; color: var(--ds-on-accent) !important; }
.jo-alert-group-head .jo-m-ic svg { width: 18px; height: 18px; }
.jo-alert-group-head b { min-width: 0; font-size: 15.5px; font-weight: 700; color: var(--ds-text-primary); }
.jo-alert-group-n { flex: none; margin-left: auto; font-size: 13px; font-weight: 700; color: var(--jo-prio-fg); }
.jo-alert-why { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ds-text-secondary); }
.jo-alert-todo { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--jo-prio-bg); font-size: 13px; line-height: 1.4; color: var(--ds-text-primary); }
html body .jo-alert-rows.jo-m-list { border: 0; border-radius: 0; background: none; box-shadow: none; }
html body .jo-alert-rows .jo-m-row-main { padding-left: 0; }

/* === Richieste di contatto (owner 30-ott-2026) ===
   La Conversazione in breve nella scheda (MobileContactRequestCard): le frasi
   dell'ospite a sinistra in grigio, quelle del chatbot a destra in lilla, con
   chi parla e l'ora sopra; sotto, la riga che apre la conversazione nell'Inbox. */
.jo-mcr-chat { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.jo-mcr-msg { display: flex; flex-direction: column; gap: 1px; align-self: flex-start; max-width: 88%; padding: 7px 11px; border-radius: 14px 14px 14px 4px; background: var(--ds-surface-sunken, #F3F4F8); }
.jo-mcr-msg:not(.is-guest) { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--ds-accent-soft, #F3EEFC); }
.jo-mcr-msg small { font-size: 11px; font-weight: 600; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mcr-msg p { margin: 0; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; color: var(--ds-text-primary, #18181B); }
.jo-mcr-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin-top: 2px; padding-top: 6px; border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); font-size: 13.5px; font-weight: 600; color: var(--ds-accent-fg, #5F45A8); -webkit-tap-highlight-color: transparent; }
.jo-mcr-open svg { flex: none; width: 16px; height: 16px; }

/* === Richieste e preferenze (owner 30-ott-2026) ===
   MobileGuestRequests e MobileGuestRequestCard, stessa famiglia di Pipeline
   lead e Richieste dai form. Lista: a destra della riga il passo successivo
   in un tocco (.jo-mq-act: Conferma la richiesta col bordo viola, Segna come
   evasa pieno tenue), con la conferma del computer. Scheda: cosa chiede in
   grande, le altre richieste dello stesso soggiorno, «Annulla la richiesta»
   scritto per esteso sotto l'azione piena. */
.jo-mq-act.jo-icon-btn { display: grid; flex: none; place-items: center; width: 36px; height: 36px; margin: 0 4px; padding: 0; border: 2px solid var(--ds-accent, #7C5CCB); border-radius: 999px; background: transparent; color: var(--ds-accent, #7C5CCB); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.jo-mq-act.is-done { border-color: transparent; background: var(--ds-accent-soft, #F3EEFC); }
/* Preventivatore (2-nov-2026, come la tabella Richieste del computer): ⇄ Converti in preventivo in viola pieno, la matita della bozza grigia. */
.jo-mq-act.is-primary { border-color: transparent; background: var(--ds-accent, #7C5CCB); color: var(--ds-on-accent, #FFFFFF); }
.jo-mq-act.is-gray { border-color: var(--ds-border, #DFE2EA); color: var(--ds-text-secondary, #3F3F46); }
.jo-mq-act:active { transform: scale(.94); }
.jo-mq-act svg { width: 18px; height: 18px; }
.jo-mgr-big { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; color: var(--ds-text-primary, #18181B); }
.jo-mgr-other { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.jo-mgr-other li + li { border-top: 1px solid var(--jo-ui-line-2, var(--ds-border, #DFE2EA)); }
.jo-mgr-other a { display: flex; align-items: center; gap: 8px; padding: 8px 0; color: inherit; -webkit-tap-highlight-color: transparent; }
.jo-mgr-other li:first-child a { padding-top: 0; }
.jo-mgr-other a > span { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.jo-mgr-other b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--ds-text-primary, #18181B); }
.jo-mgr-other small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgr-other a > svg { flex: none; width: 16px; height: 16px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mgr-cancel { align-self: center; min-height: 40px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ds-text-secondary, #3F3F46); cursor: pointer; }

/* === Feedback e questionari (owner 30-ott-2026) ===
   MobileFeedbackCard: I voti a barre col colore del voto (rosso, arancio,
   verde come la vista Card del computer) e il campo dell'esito della
   telefonata nella scheda, sopra Segna richiamato. Il voto nel cerchio della
   lista usa .jo-m-av.is-* (blocco "Preventivi"). */
.jo-fbk-votes { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.jo-fbk-votes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; }
.jo-fbk-q { min-width: 0; font-size: 13px; line-height: 1.35; color: var(--ds-text-secondary, #3F3F46); }
.jo-fbk-votes b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.jo-fbk-votes b.is-danger { color: var(--ds-err-fg, #A11A1A); }
.jo-fbk-votes b.is-warning { color: var(--ds-warn-fg, #8A4B00); }
.jo-fbk-votes b.is-success { color: var(--ds-ok-fg, #0B6B3A); }
.jo-fbk-bar { grid-column: 1 / -1; display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); }
.jo-fbk-bar i { display: block; height: 100%; border-radius: inherit; }
.jo-fbk-bar i.is-danger { background: var(--ds-err-dot, #D96B6B); }
.jo-fbk-bar i.is-warning { background: var(--ds-warn-dot, #D9A048); }
.jo-fbk-bar i.is-success { background: var(--ds-ok-dot, #8FA62A); }
.jo-fbk-note { width: 100%; min-height: 76px; padding: 9px 12px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 10px; background: var(--ds-field-bg, #FEFEFF); font: inherit; font-size: 16px; line-height: 1.4; color: var(--ds-text-primary, #18181B); resize: vertical; }
.jo-fbk-note:focus { outline: none; border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 3px var(--ds-field-focus-halo, rgba(124, 92, 203, .15)); }

/* === Riscatta voucher (owner 30-ott-2026) ===
   Sul telefono la reception trova il voucher e lo usa (vista
   voucher-redemption, .jo-vrm): un campo grande con la tastiera aperta,
   Ultimi utilizzi sotto, il voucher trovato con formula, stato, saldo e una
   sola azione piena in fondo. Sul computer resta la vista di prima (.jo-vrd). */
.jo-vrm { display: none; }
@media (max-width: 767px) {
    .jo-vrd { display: none !important; }
    .jo-vrm { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 720px; margin-inline: auto; }
    .fi-page:has(.jo-vrm) .fi-header-subheading { display: none; }
}
.jo-vrm-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-rest, 0 1px 2px rgb(0 0 0 / .06)); }
.jo-vrm-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.jo-vrm-code { width: 100%; height: 56px; padding: 0 14px; border: 2px solid var(--ds-accent, #7C5CCB); border-radius: 14px; background: var(--ds-field-bg, #FEFEFF); box-shadow: 0 0 0 4px var(--ds-accent-soft, #F3EEFC); font: inherit; font-size: 20px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-text-primary, #18181B); }
.jo-vrm-code:not(:placeholder-shown) { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
/* Col focus resta viola: senza, il plugin dei form di Tailwind dentro Filament lo
   ridipingeva azzurro (#2563EB), bordo e anello (Gabriele 19-nov-2026). */
.jo-vrm-code:focus { outline: none; border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 4px var(--ds-accent-soft, #F3EEFC); }
.jo-vrm-code::placeholder { font-size: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ds-text-placeholder, #6B6B7B); }
.jo-vrm-field { position: relative; display: flex; }
.jo-vrm-code.jo-vrm-code--small { height: 46px; padding-right: 50px; border-width: 1.5px; border-color: var(--ds-border, #DFE2EA); box-shadow: none; font-size: 16px; }
.jo-vrm-code.jo-vrm-code--small:focus { border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 3px var(--ds-accent-soft, #F3EEFC); }
.jo-vrm-clear { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; margin-top: -16px; padding: 0; border: 0; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-tertiary, #5B5B6B); cursor: pointer; }
.jo-vrm-clear svg { width: 16px; height: 16px; }
.jo-vrm-hint { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-vrm .fi-btn.jo-vrm-cta { width: 100%; min-height: 48px; justify-content: center; border-radius: 13px; font-size: 15px; }
.jo-vrm-err, .jo-vrm-done, .jo-vrm-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.jo-vrm-err svg, .jo-vrm-done svg, .jo-vrm-warn svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.jo-vrm-err { border: 1px solid var(--ds-err-bd, #F6C6C6); background: var(--ds-err-bg, #FDECEC); color: var(--ds-err-fg, #A11A1A); }
.jo-vrm-done { border: 1px solid var(--ds-ok-bd, #BFE6D0); background: var(--ds-ok-bg, #E7F6EE); color: var(--ds-ok-fg, #0B6B3A); }
.jo-vrm-warn { border: 1px solid var(--ds-warn-bd, #F9D9A6); background: var(--ds-warn-bg, #FEF3E2); color: var(--ds-warn-fg, #8A4B00); }
.jo-vrm-warn a { color: inherit; text-decoration: underline; }
.jo-vrm-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.jo-vrm-ic { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 4px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); color: var(--ds-accent, #7C5CCB); }
.jo-vrm-ic svg { width: 28px; height: 28px; }
.jo-vrm-hero h2 { margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; font-weight: 800; color: var(--ds-text-primary, #18181B); }
.jo-vrm-hero p { margin: 0; font-size: 13px; color: var(--ds-text-secondary, #3F3F46); }
.jo-vrm-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; }
.jo-vrm-lab { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); font-size: 12px; font-weight: 700; color: var(--ds-text-secondary, #3F3F46); }
.jo-vrm-bal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0; }
.jo-vrm-bal b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); }
.jo-vrm-bal small { font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-vrm-bar { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: var(--ds-surface-sunken, #F3F4F8); }
.jo-vrm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ds-lime-strong, #8FA62A); }
.jo-vrm-mv { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--ds-text-secondary, #3F3F46); }
.jo-vrm-mv svg { flex: none; width: 14px; height: 14px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-vrm-amount { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1.5px solid var(--ds-border, #DFE2EA); border-radius: 12px; background: var(--ds-field-bg, #FEFEFF); }
.jo-vrm-amount:focus-within { border-color: var(--ds-accent, #7C5CCB); box-shadow: 0 0 0 3px var(--ds-field-focus-halo, rgba(124, 92, 203, .15)); }
.jo-vrm-amount input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font: inherit; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); outline: none; }
.jo-vrm-amount small { font-size: 13px; font-weight: 600; color: var(--ds-text-tertiary, #5B5B6B); }
/* «Su cosa lo usa» (Riscatta, 10-nov-2026): la tendina e il servizio scritto nel riquadro dei campi, testo normale (non è un importo). */
.jo-vrm-use select, .jo-vrm-use input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 600; color: var(--ds-text-primary, #18181B); outline: none; }
.jo-vrm-use + .jo-vrm-use { margin-top: 8px; }
.jo-vrm-use select { appearance: none; -webkit-appearance: none; padding-right: 4px; }
.jo-vrm-use-ic { flex: none; width: 18px; height: 18px; color: var(--ds-text-tertiary, #5B5B6B); pointer-events: none; }
.jo-vrm-uses { display: flex; flex-direction: column; gap: 8px; }
.jo-vrm-uses .jo-m-av svg { width: 18px; height: 18px; }
.jo-vrm-amt { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-align: right; }
.jo-vrm-amt b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); }
.jo-vrm-amt small { font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }

/* === Hotel della Console (owner 30-ott-2026) ===
   Da sistemare per priorità coi colori di Avvisi, il cerchio quadrato dei
   gruppi, Tutti per lettera con le lettere a destra come la Rubrica
   dell'iPhone (ConsoleHotels, vista comune filter-list). */
.jo-mq-grp.is-warning { color: var(--jo-ui-warn); }
.jo-mq-row .jo-m-txt small.jo-mq-note.is-warning { font-weight: 600; }
.jo-m-av.is-square { border-radius: 10px; }
.jo-mq-grp[id] { scroll-margin-top: 84px; }
.jo-mq.has-abc .jo-m-sections { padding-right: 14px; }
.jo-mq-abc { position: fixed; z-index: 5; top: 50%; right: max(1px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; align-items: center; transform: translateY(-50%); }
.jo-mq-abc a { padding: 1px 4px; font-size: 10.5px; font-weight: 700; line-height: 1.2; color: var(--ds-accent-fg, #5F45A8); -webkit-tap-highlight-color: transparent; }

/* === Dove sono (owner 30-ott-2026, proposta D) ===
   Sul telefono la barra di ricerca dice dove si è: «Cerca in Joorna» in
   viola dentro un hotel, «Cerca in tutti gli hotel» nella Console; la
   pillola in alto a sinistra ha le iniziali dell'hotel; la capsula di
   passaggio sopra la barra in basso, come «widget tolto»
   (hotel-context-chip, filament.layouts.mobile-context, MobileNav::context). */
.jo-mctx-wrap { display: none; }
@media (max-width: 767px) {
    .jo-mctx-wrap { display: contents; }
    .fi-topbar .jo-ctx-display .jo-ctx-placeholder-m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fi-topbar .jo-ctx-display .jo-ctx-placeholder-m.is-hotel { font-weight: 600; color: var(--ds-accent-fg, #5F45A8); }
    .fi-topbar .jo-ctx-exit-av { display: grid; flex: none; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--ds-accent, #7400FF); font-size: 10px; font-weight: 800; letter-spacing: .02em; color: var(--ds-on-accent, #FFFFFF); }
    .jo-mctx-av { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--ds-accent, #7400FF); font-size: 10px; font-weight: 800; letter-spacing: .02em; color: var(--ds-on-accent, #FFFFFF); }
    .jo-mctx-capsule { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 16px 8px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ds-text-primary, #18181B) 90%, transparent); color: var(--ds-surface, #FCFCFD); box-shadow: 0 8px 24px rgb(0 0 0 / .18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transform: translateX(-50%); font-size: 14px; font-weight: 600; white-space: nowrap; }
    .jo-mctx-capsule > span:last-child { overflow: hidden; text-overflow: ellipsis; }
    .jo-mctx-capsule > span:only-child { padding-left: 8px; }
    .fi-topbar .jo-ctx-exit-t { font-size: 14px; font-style: normal; font-weight: 600; }
    /* La scheda dell'hotel in cima alla sua Home (HotelMonitor::phoneHotelCard): una riga compatta, come il profilo in Altro. */
    .jo-mhotel { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 1px; padding: 9px 12px; border-radius: 18px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-raised, 0 1px 2px rgb(0 0 0 / .06)); }
    .jo-mhotel-av { display: grid; grid-row: 1 / span 2; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ds-accent, #7400FF); font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--ds-on-accent, #FFFFFF); }
    .jo-mhotel b { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ds-text-primary, #18181B); }
    .jo-mhotel small { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
    .jo-mhotel-sw { grid-column: 3; grid-row: 1 / span 2; padding: 6px 12px; border-radius: 999px; background: var(--ds-accent-soft, #F3EEFC); font-size: 13px; font-weight: 600; color: var(--ds-accent-fg, #5F45A8); }
}
.jo-mhotel { display: none; }
@media (max-width: 767px) { .jo-mhotel { display: grid; } }

/* === Schede di una persona senza il titolo doppio (owner 2-nov-2026) ===
   Il nome grande della testata comune (mobile/contact-head) è il titolo,
   come nei Contatti dell'iPhone: il titolo della pagina («Lead», «Ospite»…)
   non si vede più sul telefono, ma resta per chi usa la lettura vocale. */
@media (max-width: 767px) {
    .fi-page:has(.jo-mcard-head) .fi-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* === Piedi fissi senza tasti sovrapposti (owner 2-nov-2026) ===
   «Difetti di sovrapposizione di tasti nel Preventivatore»: dietro i tasti
   fermi in basso la striscia del colore della pagina (form-standard.css,
   anche sul computer), qui pure per il compositore; i suoi tre tasti larghi
   uguali, la CTA per ultima, sempre fermi in basso: con una sezione aperta
   form-standard.css li rendeva relativi e lo scarto per la barra in basso
   (76px) li alzava sopra «Sconto».
   «Nascondi» dell'anteprima non serve: sul telefono sta già sotto. */
@media (max-width: 767px) {
    html body .fi-main .jo-qcomp-main .fi-form-actions {
        padding-block: 8px !important;
        background: var(--ds-bg-app) !important;
    }
    /* Con una sezione aperta la pagina ha il velo (form-standard.css): la striscia lo prende, non si vede. */
    html body.jo-focus-open .fi-main .jo-qcomp-main .fi-form-actions {
        background: linear-gradient(var(--ds-focus-veil, rgb(15 17 23 / .12)), var(--ds-focus-veil, rgb(15 17 23 / .12))), var(--ds-bg-app) !important;
    }
    /* Sotto la topbar (20) quando, a fine modulo, scorrono via verso l'alto. */
    html body .fi-main .jo-qcomp-main .fi-form-actions { position: sticky !important; z-index: 19; }
    .jo-qside .jo-qside-hide { display: none; }
    html body .fi-main .jo-qcomp-main .fi-form-actions .fi-ac { width: 100%; }
    html body .fi-main .jo-qcomp-main .fi-form-actions .fi-ac > * { flex: 1 1 0; min-width: 0; margin: 0 !important; }
    html body .fi-main .jo-qcomp-main .fi-form-actions .fi-btn { width: 100%; justify-content: center; }
}

/* ══ Schede ospite e lead sul telefono (versione A della tavola Telefono, owner 3-nov-2026, come
   l'app Salute): testata con le iniziali in un riquadro, quattro tasti grandi, i numeri due per riga,
   poi le tessere del computer una sotto l'altra: titolo in maiuscoletto e una card a righe
   nome · valore. MobileGuestCard, MobileLeadCard (mobile/card-head, card-rows, card-list). ══ */
.jo-mca { display: flex; flex-direction: column; gap: 18px; }
.jo-mca-head { display: flex; flex-direction: column; gap: 14px; }
.jo-mca-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jo-mca-who > div { min-width: 0; }
.jo-mca-av { display: grid; flex: none; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ds-accent-soft, #F4ECFF); color: var(--ds-accent-fg, #5E00D6); font-size: 18px; font-weight: 700; }
.jo-mca-who h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--ds-text-primary, #18181B); overflow-wrap: anywhere; }
.jo-mca-who p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 0; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mca-who p .is-danger { color: var(--ds-err-fg, #A11A1A); font-weight: 600; }
.jo-mca-acts { display: flex; gap: 8px; }
.jo-mca-acts a { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; height: 56px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 14px; background: var(--ds-surface, #FCFCFD); font-size: 12px; font-weight: 500; color: var(--ds-text-secondary, #3F3F46); -webkit-tap-highlight-color: transparent; }
.jo-mca-acts a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-mca-acts svg { width: 20px; height: 20px; }
.jo-mca-acts a.is-wa { color: var(--jo-channel-whatsapp, #128C4B); }
.jo-mca-acts a.is-mail { color: var(--jo-channel-email, #0369A1); }
.jo-mca-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.jo-mca-kpi { min-width: 0; padding: 14px 16px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 14px; background: var(--ds-surface, #FCFCFD); }
.jo-mca-kpi small, .jo-mca-kpi span { display: block; overflow: hidden; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); text-overflow: ellipsis; white-space: nowrap; }
.jo-mca-kpi b { display: block; margin-top: 2px; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; }
.jo-mca-kpi b.is-long { font-size: 16px; }
.jo-mca-kpis .jo-sc-notice { grid-column: 1 / -1; }
.jo-mca-cap { margin: 0 4px 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mca-card { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 14px; background: var(--ds-surface, #FCFCFD); }
.jo-mca-r { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ds-row-divider, #E8EAF0); font-size: 14px; color: inherit; }
.jo-mca-card > .jo-mca-r:first-child, .jo-mca-pl + .jo-mca-r { padding-top: 0; border-top: 0; }
.jo-mca-r > span { min-width: 0; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mca-r > b { min-width: 0; overflow: hidden; font-weight: 500; text-align: right; color: var(--ds-text-primary, #18181B); text-overflow: ellipsis; white-space: nowrap; }
.jo-mca-link > span { display: flex; flex-direction: column; gap: 2px; }
.jo-mca-link > span b { font-weight: 500; color: var(--ds-text-primary, #18181B); }
.jo-mca-link > span small { font-size: 12.5px; }
.jo-mca-link > em { flex: none; font-style: normal; font-weight: 500; color: var(--ds-text-primary, #18181B); }
.jo-mca-pl { margin: 0; padding: 12px 0 8px; border-top: 1px dashed var(--ds-border, #DFE2EA); font-size: 12px; font-weight: 600; color: var(--ds-text-secondary, #3F3F46); }
.jo-mca-card > .jo-mca-pl:first-child, .jo-mca-pl--out { padding-top: 12px; border-top: 0; }
.jo-mca-pl--out { padding: 12px 4px 6px; }
.jo-mca-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 10px 10px 16px; border: 1px dashed var(--ds-border, #DFE2EA); border-radius: 14px; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mca-plus { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 8px; background: var(--ds-surface, #FCFCFD); color: var(--ds-text-secondary, #3F3F46); }
.jo-mca-plus svg { width: 16px; height: 16px; }
.jo-mca-add { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--ds-accent-fg, #5E00D6); }
.jo-mca-add svg { width: 16px; height: 16px; }
/* I blocchi del computer dentro la card del telefono: niente riquadro nel riquadro né il loro titolo (c'è già quello della card). */
.jo-mca-card .jo-gp-card { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.jo-mca-card .jo-gp-title { display: none !important; }
/* Percorso del lead sul telefono: i passi di LeadPath in colonna, un tocco per passarci; fatto = lime con la spunta, adesso = viola. */
.jo-mca-path { display: flex; flex-direction: column; }
.jo-mca-path > button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 0; border-top: 1px solid var(--ds-row-divider, #E8EAF0); font-size: 14px; color: var(--ds-text-secondary, #3F3F46); text-align: left; }
.jo-mca-path > button:first-child { padding-top: 0; border-top: 0; }
.jo-mca-path > button i { display: grid; flex: none; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--ds-border-strong, #C9CDD8); border-radius: 50%; background: var(--ds-surface, #FCFCFD); font-size: 10px; font-style: normal; font-weight: 700; }
.jo-mca-path > button.is-done i { border-color: var(--ds-lime-strong, #8FA62A); background: var(--ds-lime, #D0F60E); }
.jo-mca-path > button.is-done i::before { content: "✓"; color: var(--ds-lime-fg, #2A3300); }
.jo-mca-path > button.is-on { font-weight: 600; color: var(--ds-accent-fg, #5E00D6); }
.jo-mca-path > button.is-on i { border-color: var(--ds-accent, #7400FF); background: radial-gradient(circle, var(--ds-accent, #7400FF) 0 4px, var(--ds-surface, #FCFCFD) 4.5px); box-shadow: 0 0 0 4px var(--ds-accent-soft, #F4ECFF); }
.jo-mca-path > button.jo-mca-lost { padding-left: 28px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-mca-path > button.jo-mca-lost.is-on { color: var(--ds-err-fg, #A11A1A); }
.jo-mca-next { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--ds-surface-sunken, #F3F4F8); font-size: 13px; color: var(--ds-text-secondary, #3F3F46); }
.jo-mca-next a { display: inline-block; margin-top: 4px; font-weight: 600; color: var(--ds-accent-fg, #5E00D6); }

/* === Come il computer dal 10-nov-2026 (owner) ===
   Solo disegno, stessi blocchi: la testata sta nella fascia viola del
   computer (design-system.css, lì solo dai 768px), col sotto-menu e la barra
   delle sezioni attaccati sotto; la barra in basso, il posto del menu
   laterale, prende il suo viola e il tasto acceso ha l'icona lime come la
   voce aperta del menu. */
@media (max-width: 767px) {
    html body .fi-page > section > .fi-header,
    html body .fi-page > section > div > header.fi-header:first-child,
    html body .fi-page > section > header.jo-gd > .jo-gd-head,
    html body .fi-page .jo-ibx > .jo-ibx-head {
        padding: 16px;
        border-radius: 16px;
        background: linear-gradient(90deg, var(--ds-side-bg-top), var(--ds-side-bg-bottom));
    }
    html body .fi-page > section .fi-header .fi-header-heading,
    html body .fi-page > section header.jo-gd > .jo-gd-head h1,
    html body .fi-page .jo-ibx > .jo-ibx-head .jo-ibx-title h1 { color: var(--ds-side-fg-strong) !important; }
    /* Come al computer: non gli avvisi (.jo-callout) e i badge di stato
       nella descrizione, che hanno il loro fondo chiaro e il testo scuro;
       chiare le righe sotto il titolo (.jo-stx-sub, .jo-cr-head-meta). */
    html body .fi-page > section .fi-header .fi-header-subheading,
    html body .fi-page > section .fi-header .fi-header-subheading span:not(.jo-callout, .jo-callout span, .fi-badge, .fi-badge span),
    html body .fi-page > section .fi-header .fi-header-heading .jo-stx-sub,
    html body .fi-page > section .fi-header .fi-header-heading .jo-cr-head-meta,
    html body .fi-page > section header.jo-gd > .jo-gd-head p,
    html body .fi-page > section header.jo-gd > .jo-gd-head .jo-page-desc,
    html body .fi-page .jo-ibx > .jo-ibx-head .jo-ibx-title p { color: var(--ds-side-sub) !important; }
    /* Etichette dell'ospite (Gold, VIP…) accanto al nome, su fondo chiaro. */
    html body .fi-page > section .fi-header .jo-cell-tag {
        border-color: transparent;
        background: var(--ds-surface);
    }
    html body .fi-page > section .fi-header .fi-icon-btn,
    html body .fi-page > section header.jo-gd > .jo-gd-head .jo-icon-btn { color: var(--ds-side-fg) !important; }
    html body .fi-page > section header.jo-gd > .jo-gd-head .jo-widgets-edit[aria-pressed="true"] { background: var(--ds-surface) !important; color: var(--ds-accent-fg) !important; }
    html body .fi-page > section .fi-header .fi-btn.fi-color-primary {
        background: var(--ds-surface) !important;
        color: var(--ds-accent-fg) !important;
        box-shadow: none !important;
    }
    html body .fi-page > section .fi-header .fi-btn.fi-color-primary .fi-btn-icon { color: var(--ds-accent-fg) !important; }
    html body .fi-page > section .fi-header .fi-btn.fi-color-gray {
        background: transparent !important;
        color: var(--ds-side-fg-strong) !important;
        box-shadow: inset 0 0 0 1px var(--ds-side-line) !important;
    }
    html body .fi-page > section .fi-header .fi-btn.fi-color-gray .fi-btn-icon { color: var(--ds-side-fg) !important; }

    /* Sotto-menu e barra delle sezioni nello stesso viola sfumato (prima
       viola pieno), con l'ombra ai lati che dice che scorrono. */
    html body .fi-page-sub-navigation-tabs.fi-page-sub-navigation-tabs,
    html body .jo-sec-tabs.jo-sec-tabs {
        border-color: transparent !important;
        border-radius: 16px !important;
        background:
            linear-gradient(var(--ds-side-bg-top), var(--ds-side-bg-top)) left center / 28px 100% no-repeat local,
            linear-gradient(var(--ds-side-bg-bottom), var(--ds-side-bg-bottom)) right center / 28px 100% no-repeat local,
            linear-gradient(to right, var(--ds-backdrop), transparent) left center / 28px 100% no-repeat scroll,
            linear-gradient(to left, var(--ds-backdrop), transparent) right center / 28px 100% no-repeat scroll,
            linear-gradient(90deg, var(--ds-side-bg-top), var(--ds-side-bg-bottom)) !important;
    }

    /* Subito sotto la testata, senza KPI in mezzo: la parte bassa della
       fascia (sotto-menu, menu della pagina, barra delle sezioni). */
    html body .fi-page.jo-subnav-joined > section > .fi-header:has(+ div > nav.fi-page-sub-navigation-tabs),
    html body .fi-page.jo-band-joined > section > .fi-header,
    html body .fi-page.jo-sec-page > section > .fi-header:has(+ div > nav.jo-sec-tabs) {
        margin-bottom: -20px;
        padding-bottom: 10px;
        border-radius: 16px 16px 0 0;
    }
    html body .fi-page.jo-subnav-joined .fi-header + div > nav.fi-page-sub-navigation-tabs.fi-page-sub-navigation-tabs,
    html body .fi-page.jo-band-joined nav.jo-band-nav.fi-page-sub-navigation-tabs,
    html body .fi-page.jo-sec-page > section > .fi-header + div > nav.jo-sec-tabs.jo-sec-tabs {
        border-radius: 0 0 16px 16px !important;
        box-shadow: none !important;
    }

    /* Barra in basso col viola del menu laterale. */
    .jo-mtab {
        border-color: transparent;
        background: linear-gradient(90deg, var(--ds-side-bg-top), var(--ds-side-bg-bottom));
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .jo-mtab-item { color: var(--ds-sb-fg); }
    .jo-mtab-ic { color: var(--ds-sb-icon); }
    .jo-mtab-item.is-active {
        background: var(--ds-sb-active-bg);
        box-shadow: inset 0 0 0 1px var(--ds-sb-active-ring);
        color: var(--ds-sb-fg-strong);
        font-weight: 600;
    }
    .jo-mtab-item.is-active .jo-mtab-ic { color: var(--ds-lime); }
    .jo-mtab-item:active { background: var(--ds-sb-hover); }
    .jo-mtab-item:focus-visible .jo-mtab-ic { box-shadow: var(--ds-sb-focus); }
    .jo-mtab-badge {
        border-color: var(--ds-sb-solid);
        background: var(--ds-sb-badge-bg);
        color: var(--ds-sb-badge-fg);
    }
    .jo-mtab-badge--urgent { background: var(--ds-err-dot); color: var(--ds-on-accent); }
}

/* === Fascia e KPI sul telefono, seconda passata (owner 10-nov-2026) ===
   Come il computer: fascia (testata e menu), poi i KPI, poi il resto. */
@media (max-width: 767px) {
    /* Liste dell'app col menu (Preventivatore: Richieste · Preventivi ·
       Prenotazioni): il menu è la parte bassa della fascia, i KPI sotto
       (filter-list.blade.php). Fra testata e contenuto dell'app ci sono 12px. */
    html body .fi-page:has(.jo-mq > .jo-mq-menu:first-child) > section > .fi-header {
        margin-bottom: -12px;
        padding-bottom: 10px;
        border-radius: 16px 16px 0 0;
    }
    html body .jo-mq > nav.jo-mq-menu:first-child { border-radius: 0 0 16px 16px !important; box-shadow: none !important; }

    /* Home dell'hotel e della Console: titolo, scheda dell'hotel con
       «Cambia», periodo e matita nella stessa fascia, come titolo, periodo,
       Widget e Sposta nella fascia della Panoramica del computer. In modifica
       dei widget la scheda e il periodo si nascondono e la testata torna intera. */
    html body .fi-page:has(.jo-mw:not(.is-editing)) > section > .fi-header {
        margin-bottom: -12px;
        padding-bottom: 6px;
        border-radius: 16px 16px 0 0;
    }
    html body .jo-mw > .jo-mhotel,
    html body .jo-mw > .jo-mw-period {
        margin-bottom: -12px;
        border-radius: 0;
        background: linear-gradient(90deg, var(--ds-side-bg-top), var(--ds-side-bg-bottom));
        box-shadow: none;
    }
    html body .jo-mw > .jo-mhotel { padding: 6px 16px; }
    html body .jo-mw > .jo-mw-period { margin-bottom: 0; padding: 8px 16px 14px; border-radius: 0 0 16px 16px; }
    html body .jo-mw > .jo-mhotel .jo-mhotel-av { background: var(--ds-sb-active-bg); color: var(--ds-side-fg-strong); }
    html body .jo-mw > .jo-mhotel b { color: var(--ds-side-fg-strong); }
    html body .jo-mw > .jo-mhotel small { color: var(--ds-side-muted); }
    html body .jo-mw > .jo-mhotel .jo-mhotel-sw { background: transparent; box-shadow: inset 0 0 0 1px var(--ds-side-line); color: var(--ds-side-fg-strong); }
    /* Il periodo a segmenti nella fascia: qui sulla Home, nelle bacheche
       (Panoramica, Panoramica chatbot) e nelle testate standard col periodo
       (Performance, Preventivatore: controllo dell'11-nov-2026, prima senza la
       barra e con le voci quasi illeggibili sul viola); voce scelta come la CTA. */
    html body .jo-mw-period.jo-mw-period .jo-period .jo-gd-seg,
    html body .fi-page > section > header.jo-gd > .jo-gd-head .jo-period .jo-gd-seg,
    html body .fi-page > section .fi-header.fi-header .jo-period .jo-gd-seg { background: var(--ds-sb-active-bg); }
    html body .jo-mw-period.jo-mw-period .jo-period .jo-gd-seg button,
    html body .fi-page > section > header.jo-gd > .jo-gd-head .jo-period .jo-gd-seg button,
    html body .fi-page > section .fi-header.fi-header .jo-period .jo-gd-seg button { color: var(--ds-side-fg); }
    html body .jo-mw-period.jo-mw-period .jo-period .jo-gd-seg button[aria-pressed='true'],
    html body .fi-page > section > header.jo-gd > .jo-gd-head .jo-period .jo-gd-seg button[aria-pressed='true'],
    html body .fi-page > section .fi-header.fi-header .jo-period .jo-gd-seg button[aria-pressed='true'] { background: var(--ds-surface); color: var(--ds-accent-fg); }
    html body .jo-mw-period .jo-mw-edit { background: var(--ds-sb-active-bg); color: var(--ds-side-fg-strong); }
    html body .jo-mw-period .jo-mw-note { color: var(--ds-side-muted); }

    /* KPI su una riga sola (owner 10-nov-2026: «troppo grandi… su una sola
       riga»; regola «mai due file di KPI»): tutte le tessere affiancate in
       parti uguali, basse, senza icona, mini-grafico e nota; la nota si legge
       toccando la tessera (mobile.js). I widget della Home restano com'erano. */
    html body .jo-kpis.jo-kpis:not(.jo-mw-w .jo-kpis),
    html body .fi-page-header-widgets.fi-page-header-widgets:not(:has(> :not(.jo-kpi))),
    html body .fi-wi-stats-overview-stats-ctn.fi-wi-stats-overview-stats-ctn {
        display: grid !important;
        grid-template-columns: none !important;
        grid-auto-flow: column !important;
        grid-auto-columns: minmax(0, 1fr) !important;
        grid-auto-rows: auto !important;
        gap: 8px !important;
    }
    html body .jo-kpis.jo-kpis:not(.jo-mw-w .jo-kpis) > *,
    html body .fi-page-header-widgets.fi-page-header-widgets > .jo-kpi,
    html body .fi-wi-stats-overview-stats-ctn.fi-wi-stats-overview-stats-ctn > * { grid-column: auto !important; grid-row: auto !important; }
    /* Etichetta e numero si adattano alla larghezza della tessera (cqi):
       con quattro tessere 11.5px e 20px, con cinque un po' meno. */
    html body .jo-kpi.jo-kpi:not(.jo-mw-w .jo-kpi),
    html body .fi-wi-stats-overview-stat.fi-wi-stats-overview-stat { container-type: inline-size; min-height: 0 !important; padding: 8px !important; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-top { margin-bottom: 4px; }
    /* Icona, mini-grafico, nota e «i» non ci stanno: la nota e la spiegazione
       della «i» si leggono toccando la tessera (mobile.js). */
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-top > .jo-kpi-ic,
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) .jo-info--metric,
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-note,
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-spark,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-icon,
    html body .fi-wi-stats-overview-stat .jo-info--metric,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-description,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-chart { display: none !important; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) .jo-kpi-lbl,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-label { font-size: clamp(10.5px, 18cqi, 11.5px) !important; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-val,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value { font-size: clamp(15px, 30cqi, 20px) !important; }
    /* Etichetta intera, a capo e senza puntini (cliente 29-ott-2026: sul
       telefono non c'è il tooltip a dirla; prima la terza riga finiva sopra
       il numero), il numero in fondo alla tessera: i numeri della riga
       restano allineati. Se non ci sta, mobile.js lo rimpicciolisce. */
    html body .jo-kpi.jo-kpi:not(.jo-mw-w .jo-kpi),
    html body .fi-wi-stats-overview-stat.fi-wi-stats-overview-stat > .grid { flex-flow: column nowrap !important; align-items: stretch !important; }
    html body .fi-wi-stats-overview-stat.fi-wi-stats-overview-stat { align-items: stretch; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-top,
    html body .fi-wi-stats-overview-stat.fi-wi-stats-overview-stat > .grid > :first-child { flex: 0 0 auto; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-top > .jo-kpi-lbl { display: block; -webkit-line-clamp: none; line-clamp: none; }
    html body .jo-kpi:not(.jo-mw-w .jo-kpi) > .jo-kpi-val,
    html body .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value { margin-top: auto !important; }
}
