/*
 * Standard dei form JOORNA (creazione, modifica, impostazioni, step dei
 * builder). Card e griglia da App\Filament\Support\FormCards + FormGrid
 * (classe .jo-fcard sulle card). Caricato dopo design-system.css.
 *
 * pagina (fondo neutro) → card bianca con testata lilla bassa → campi su
 * più colonne, larghi quanto il dato; controlli tutti uguali (34px, radius
 * 8px, stessa tipografia, stessi stati). Viola pieno solo per CTA e stati
 * attivi.
 */

/* ── Card ───────────────────────────────────────────────── */

html .fi-section.jo-fcard {
    background: var(--ds-surface, #FFFFFF);
    overflow: visible;
    border-radius: 10px !important;
    box-shadow: none !important;
}

html .fi-section.jo-fcard > .fi-section-header {
    min-height: 44px;
    padding: 9px 16px !important;
    gap: 10px;
    /* Testata neutra (standard: il lilla è solo un accento), filetto sotto. */
    background: transparent !important;
    border-bottom: 1px solid var(--ds-row-divider, var(--ds-border, #E4E6EC)) !important;
    border-radius: 10px 10px 0 0 !important;
}

html .fi-section.jo-fcard.fi-collapsed > .fi-section-header {
    border-bottom-color: transparent !important;
    border-radius: var(--ds-radius-card, 12px) !important;
}

html .fi-section.jo-fcard > .fi-section-header.cursor-pointer:hover {
    background: var(--ds-row-hover, #F6F2FD) !important;
}

html .fi-section.jo-fcard > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h3);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ds-text-primary, #18181B) !important;
}

html .fi-section.jo-fcard > .fi-section-header .fi-section-header-description {
    margin-top: 1px;
    font-size: 12.5px;
    line-height: 1.4;
}

html .fi-section.jo-fcard > .fi-section-header .fi-icon-btn {
    color: var(--ds-accent-fg, #6A4BB5);
}

html .fi-section.jo-fcard > .fi-section-content-ctn {
    border-top: 0 !important;
}

html .fi-section.jo-fcard > .fi-section-content-ctn > .fi-section-content {
    padding: 14px 16px 16px !important;
}

/* La griglia JOORNA segue la larghezza della card, non della finestra: in
   una card stretta (modale, tablet, colonna centrale di un form a ancore) 6
   colonne con gli span "md" di FormGrid, sotto i 380px una colonna. Solo la
   griglia diretta delle card .jo-fcard-dense: le griglie scritte a mano
   dentro restano come sono. */
html .fi-section.jo-fcard-dense > .fi-section-content-ctn > .fi-section-content {
    container: jo-fcard / inline-size;
}

@container jo-fcard (max-width: 720px) {
    .fi-section-content > .fi-fo-component-ctn {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }

    .fi-section-content > .fi-fo-component-ctn > div {
        grid-column: var(--col-span-md, 1 / -1) !important;
    }
}

/* Card molto strette: un terzo torna a metà, per restare leggibile. */
@container jo-fcard (max-width: 520px) {
    .fi-section-content > .fi-fo-component-ctn > [style*="--col-span-md: span 2"] {
        grid-column: span 3 / span 3 !important;
    }
}

@container jo-fcard (max-width: 380px) {
    .fi-section-content > .fi-fo-component-ctn {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .fi-section-content > .fi-fo-component-ctn > div {
        grid-column: 1 / -1 !important;
    }
}

/* Dentro le liste (proposte, azioni, servizi…) lo stesso passo stretto. */
html .fi-section.jo-fcard .fi-fo-repeater-item .fi-fo-component-ctn {
    gap: 12px 14px;
}

/* Preventivo: le schede "Proposta 1 | 2" ci sono solo con due proposte;
   con una sola non lasciano una fascia vuota sopra la proposta. */
html .jo-psel > .fi-fo-component-ctn {
    row-gap: 0;
}

/* Una griglia dentro la card (FormGrid::alignGrid, .jo-fgrid): lo stesso passo
   della card, così le sue colonne stanno su quelle delle righe vicine. */
html .fi-section.jo-fcard .jo-fgrid > .fi-fo-component-ctn {
    gap: 12px 14px;
}

/* Campi vicini ma leggibili: 12px fra le righe, 14px fra le colonne. */
html .fi-section.jo-fcard > .fi-section-content-ctn > .fi-section-content > .fi-fo-component-ctn,
html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-content-ctn > .fi-section-content > .fi-fo-component-ctn {
    gap: 12px 14px;
}

/* Card in fila: lo stesso passo dei campi, non quello di pagina. */
.fi-fo-component-ctn:has(> * > .fi-section.jo-fcard) {
    row-gap: 14px;
}

/* ── Campi: label piccola, subito sopra il controllo ───── */

.fi-fo-field-wrp > .grid {
    row-gap: 4px;
}

.fi-fo-field-wrp-label > span {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
}

/* Campi affiancati: etichetta su una riga (puntini, testo intero al
   passaggio da ui-standard.js), così i controlli della stessa riga partono
   alla stessa altezza. Non le etichette accanto a una casella/interruttore. */
@media (min-width: 768px) {
    .fi-fo-field-wrp-label:not(:has(input, button)) {
        min-width: 0;
        max-width: 100%;
    }

    .fi-fo-field-wrp-label:not(:has(input, button)) > span {
        display: block;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

html:not(.dark) .fi-fo-field-wrp-label > span {
    color: var(--ds-text-secondary, #3F3F46);
}

/* Caselle di testo (owner 29-ott-2026): crescono col testo fino a circa 10 righe, poi
   scorrono dentro; il codice (data-jo-code) tiene le sue righe. In sola lettura un testo
   lungo resta compatto con «Mostra tutto» (ui-standard.js). */
.fi-fo-textarea textarea:not([data-jo-code]) {
    max-height: 15rem;
    overflow-y: auto !important;
}
/* L'autosize di Filament (3.3) non allunga la casella ma il div che la contiene, alto
   quanto TUTTO il testo: con la casella ferma a 15rem restava sotto un riquadro bianco
   lungo migliaia di pixel (istruzioni del chatbot, Elia 5-nov-2026). Stesso massimo al
   contenitore: la casella (h-full) lo riempie e scorre dentro con la sua barra. */
.fi-fo-textarea .fi-input-wrp-input > div:has(> textarea:not([data-jo-code]):not(.jo-ta-full)) {
    max-height: 15rem;
}
.fi-fo-textarea textarea.jo-ta-full {
    max-height: none;
}
/* Il codice (HTML delle email, JSON) parte chiuso in una riga: si legge la
   prima e si apre con un clic, solo se lo si vuole vedere o cambiare
   (owner 19-nov-2026, card «Campi dei form»; ui-standard.js lo tiene aperto). */
.fi-fo-textarea textarea[data-jo-code]:not(.jo-code-open) {
    height: 38px !important;
    min-height: 0;
    overflow: hidden !important;
    white-space: pre;
    resize: none;
    cursor: pointer;
}
.jo-ta-more {
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ds-accent-fg);
}

.fi-fo-field-wrp-helper-text,
.fi-fo-field-wrp-hint {
    font-size: 12px;
    line-height: 1.4;
}

/* Editor email (Unlayer) mentre si carica (segnalazione E1): lo spazio lo dice, mai bianco. */
.jo-unlayer-wait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed var(--ds-border-strong, var(--ds-border));
    border-radius: var(--ds-radius-control, 8px);
    color: var(--ds-text-secondary);
    font-size: 13.5px;
}

/* Obbligatori (owner 29-ott-2026, una regola per tutti i form): asterisco rosso ben
   visibile; nessun colore su un campo non toccato; un obbligatorio ancora vuoto
   diventa rosso col motivo sotto solo dopo un salvataggio (data-jo-missing,
   form-steps.js; 3-nov-2026). Un facoltativo vuoto resta senza colore. */
.fi-fo-field-wrp-label sup {
    color: var(--ds-err-fg, #DC2626) !important;
    font-size: 14px;
    font-weight: 700;
    /* Poco sopra la riga, non mezza riga: le etichette coi puntini (overflow nascosto)
       lo tagliavano a metà e restava un puntino (3-nov-2026). */
    top: -.15em;
}
.fi-fo-field-wrp[data-jo-missing] .fi-input-wrp,
.fi-fo-field-wrp[data-jo-missing] .choices__inner,
.fi-fo-field-wrp[data-jo-missing] .fi-fo-textarea {
    --tw-ring-color: var(--ds-err-fg, #DC2626) !important;
    box-shadow: 0 0 0 1px var(--ds-err-fg, #DC2626) !important;
}
.fi-fo-field-wrp[data-jo-missing] > .grid::after {
    content: "Obbligatorio: va compilato.";
    font-size: 12px;
    color: var(--ds-err-fg, #DC2626);
}

/* La «i» (solo icona, senza azioni) subito dopo l'etichetta, non in fondo alla riga
   (owner 29-ott-2026). */
.fi-fo-field-wrp > .grid > div:has(> .fi-fo-field-wrp-label):has(> .fi-fo-field-wrp-hint):not(:has(.fi-fo-field-wrp-hint-action)) {
    justify-content: flex-start;
    column-gap: 6px;
}

.fi-fo-field-wrp-error-message {
    font-size: 12px;
}

/* ── Controlli: stessa altezza, radius, tipografia, stati ── */

.fi-input-wrp,
.fi-fo-textarea,
.fi-fo-tags-input,
.fi-fo-select .choices__inner {
    border-radius: var(--ds-radius-control, 8px) !important;
}

.fi-input-wrp {
    min-height: 38px;
}

.fi-input,
.fi-select-input,
.fi-fo-date-time-picker-display-text-input {
    font-size: 14px;
    line-height: 20px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.fi-fo-select .choices__inner {
    min-height: 38px;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    font-size: 14px;
}

/* Select a voce singola alta come gli altri campi (38px): il valore era un
   inline-block sulla linea di base e allungava il controllo a 39-40px. */
.fi-fo-select .choices__inner:has(> .choices__list--single) {
    display: flex !important;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.fi-fo-select .choices__list--single {
    display: block;
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 20px;
}

/* Caselle sì/no sulla linea dei controlli accanto: centrate sui 38px del
   campo vicino, non attaccate in alto. */
.fi-fo-field-wrp .grid:has(> .fi-fo-toggle) {
    min-height: 38px;
    align-content: center;
}

/* Select con una voce lunga: una riga con i puntini, non due righe. */
.fi-fo-select .choices__list--single .choices__item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html:not(.dark) .fi-input-wrp:hover:not(:focus-within):not(.fi-disabled) {
    --tw-ring-color: var(--ds-field-border, #C5CBD5) !important;
}

.fi-input-wrp:focus-within {
    --tw-ring-color: var(--ds-accent, #7C5CCB) !important;
}

/* ── Card annidate (es. "Più dettagli"): riga discreta ── */

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) {
    box-shadow: none !important;
    border: 1px solid var(--ds-row-divider, #EEF0F4) !important;
    border-radius: var(--ds-radius-control, 8px) !important;
    background: var(--ds-surface-sunken, #F8F9FB);
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-header {
    padding: 8px 12px;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-content-ctn > .fi-section-content {
    padding: 10px 12px 12px;
}

/* Terzo livello (un blocco dentro un blocco della card): niente terzo
   riquadro, solo il titolo del gruppo e i campi, separati da un filetto. */
html .fi-section.jo-fcard .fi-section:not(.jo-fcard) .fi-section:not(.jo-fcard) {
    border: 0 !important;
    border-top: 1px solid var(--ds-row-divider, #EEF0F4) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) .fi-section:not(.jo-fcard) > .fi-section-header {
    padding: 10px 0 4px;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) .fi-section:not(.jo-fcard) > .fi-section-content-ctn > .fi-section-content {
    padding: 6px 0 4px;
}

/* ── Card-passo dei form di creazione e modifica (.jo-fstep) ──
 * FormCards::isStep + public/js/form-steps.js: numerate 01, 02… lungo una
 * linea sottilissima, una aperta alla volta. Righe chiuse sottili (numero →
 * titolo → riepilogo → stato → chevron), il colore è solo un accento:
 * aperta = bordo lilla leggero "○ In compilazione"; completa = verde
 * tenue "✓ Completato"; altrimenti neutra "● Da compilare". Token
 * --ds-step-* in joorna-tokens.css (chiaro e dark). */

/* Passo stretto fra le card, anche quando stanno in gruppi diversi. */
.fi-form > .fi-fo-component-ctn:has(.fi-section.jo-fstep),
.fi-form > .fi-fo-component-ctn:has(.fi-section.jo-fstep) .fi-fo-component-ctn:has(> * > .fi-section.jo-fstep) {
    row-gap: 8px;
}

/* Le card-passo stanno sempre una sotto l'altra, 01, 02, 03…: una griglia
   di layout che le affiancava (contenuto + colonna laterale) diventa una
   colonna sola, anche nei gruppi annidati e nei form scritti a mano
   (es. Scheda ospite, form.jo-gs-form). */
:is(.fi-form, form) .fi-fo-component-ctn:has(> div .fi-section.jo-fstep) {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 8px !important;
}

:is(.fi-form, form) .fi-fo-component-ctn:has(> div .fi-section.jo-fstep) > div {
    grid-column: 1 / -1 !important;
}

/* Una numerazione per form (anche attraverso i gruppi di layout e nei form
   scritti a mano, es. Scheda lead: senza un azzeramento in comune ogni
   passo annidato ripartiva da 01). */
form:has(.fi-section.jo-fstep),
.fi-form > .fi-fo-component-ctn,
.jo-fsteps {
    counter-reset: jo-fstep;
}

html .fi-section.jo-fstep {
    position: relative;
    overflow: visible;
    counter-increment: jo-fstep;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease;
}

/* Riga sottile: niente fascia colorata, solo un filetto sotto quando è aperta. */
html .fi-section.jo-fstep > .fi-section-header {
    position: relative;
    min-height: 46px;
    padding: 8px 14px 8px 52px !important;
    background: transparent !important;
    border-bottom: 0 !important;
}

html .fi-section.jo-fstep:not(.fi-collapsed) > .fi-section-header {
    border-bottom: 1px solid var(--ds-row-divider, var(--ds-border, #E4E6EC)) !important;
}

/* Il numero: piccolo cerchio outline, tipografia regolare. */
html .fi-section.jo-fstep > .fi-section-header::before {
    content: counter(jo-fstep, decimal-leading-zero);
    position: absolute;
    left: 15px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--ds-step-todo-ring, #CDD1DA);
    background: var(--ds-surface, #FFFFFF);
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 3px var(--ds-surface, #FFFFFF);
}

/* La linea che collega i numeri, fino al cerchio della card dopo. */
html .fi-section.jo-fstep::after {
    content: "";
    position: absolute;
    z-index: 2;
    left: 28px;
    top: 37px;
    bottom: -19px;
    width: 1px;
    background: var(--ds-border, #E4E6EC);
    pointer-events: none;
}

/* Card aperta: la linea riprende solo sotto, nello spazio fra le card. */
html .fi-section.jo-fstep:not(.fi-collapsed)::after {
    top: auto;
    height: 19px;
}

/* Dopo l'ultima card la linea si ferma (form-steps.js la segna). */
.fi-section.jo-fstep.jo-fstep-last::after {
    display: none;
}

/* Card di una tab di modifica (FormCards::isPlainStep, es. Scheda hotel):
   impostazioni contestuali all'area, non passi: accordion e riepilogo,
   senza numero, linea né stato. */
html .fi-section.jo-fstep.jo-fstep-plain > .fi-section-header {
    padding-left: 14px !important;
}

html .fi-section.jo-fstep.jo-fstep-plain > .fi-section-header::before,
html .fi-section.jo-fstep.jo-fstep-plain::after {
    display: none !important;
}

/* Impostazioni a sé stanti, non un percorso: niente badge di stato e
   niente fondo "completato"; restano accordion e riepilogo da chiusa. */
html .fi-section.jo-fstep.jo-fstep-plain .jo-fstep-badge {
    display: none !important;
}

html .fi-section.jo-fstep.jo-fstep-plain[data-jo-state] {
    background: var(--ds-surface) !important;
    border-color: var(--ds-border) !important;
}

html .fi-section.jo-fstep.jo-fstep-plain[data-jo-state="current"] {
    border-color: var(--ds-step-current-bd, #DCD1F4) !important;
}

/* Il numero fa già da segno: niente icona della card accanto. Sulla linea
   dei passi (.jo-ftl) sì, tutte dal dizionario StepIcons (owner 4-nov-2026). */
html .fi-section.jo-fstep:not(.jo-ftl) > .fi-section-header .fi-section-header-icon {
    display: none;
}

/* Titolo e stato sulla stessa riga. */
html .fi-section.jo-fstep .fi-section-header-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

html .fi-section.jo-fstep .fi-section-header-description {
    margin-top: 1px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ds-text-tertiary, #5B5B6B);
}

/* Stato: testo piccolo con un segno, senza pillola piena. */
.jo-fstep-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 8px;
    border-radius: var(--ds-radius-pill, 999px);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.jo-fstep-badge[hidden] {
    display: none;
}

/* Da compilare: pallino neutro. */
.jo-fstep-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-off-dot, #8A8A99);
    opacity: .7;
}

/* In compilazione: cerchio vuoto lilla. */
.jo-fstep-badge[data-state="current"] {
    border-color: var(--ds-step-current-bd, #DCD1F4);
    color: var(--ds-accent-fg, #6A4BB5);
}

.jo-fstep-badge[data-state="current"]::before {
    width: 7px;
    height: 7px;
    background: transparent;
    border: 1.5px solid currentColor;
    opacity: 1;
}

/* Completato: spunta verde tenue. */
.jo-fstep-badge[data-state="done"] {
    border-color: var(--ds-step-done-bd, #D3EBDD);
    color: var(--ds-step-done-fg, #2E7A50);
}

.jo-fstep-badge[data-state="done"]::before {
    content: "✓";
    width: auto;
    height: auto;
    border: 0;
    background: none;
    opacity: 1;
    font-size: 11px;
    font-weight: 700;
}

/* Riepilogo: solo da chiusa, al posto della descrizione, una riga. */
.jo-fstep-summary {
    display: none;
    margin: 1px 0 0;
    font-size: 12.5px;
    color: var(--ds-text-secondary, #3F3F46);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html .fi-section.jo-fstep.fi-collapsed.jo-fstep-has-summary .jo-fstep-summary {
    display: block;
}

html .fi-section.jo-fstep.fi-collapsed.jo-fstep-has-summary .fi-section-header-description {
    display: none;
}

/* Stati della card: il colore solo su bordo e numero. */
html .fi-section.jo-fstep[data-jo-state="todo"],
html .fi-section.jo-fstep[data-jo-state="info"] {
    background: var(--ds-surface, #FFFFFF) !important;
}

html .fi-section.jo-fstep[data-jo-state="current"] {
    background: var(--ds-surface, #FFFFFF) !important;
    border-color: var(--ds-step-current-bd, #DCD1F4) !important;
}

html .fi-section.jo-fstep[data-jo-state="current"] > .fi-section-header::before {
    border-color: var(--ds-accent, #7C5CCB);
    color: var(--ds-accent-fg, #6A4BB5);
}

html .fi-section.jo-fstep[data-jo-state="done"] {
    background: var(--ds-step-done-bg, #F7FBF8) !important;
    border-color: var(--ds-step-done-bd, #D3EBDD) !important;
}

html .fi-section.jo-fstep[data-jo-state="done"] > .fi-section-header::before {
    border-color: var(--ds-step-done-ring, #9FD3B5);
    color: var(--ds-step-done-fg, #2E7A50);
}

/* Sezioni interne di una card-passo: piccole sezioni, mai una card nella
   card — titolo discreto e filetto, niente riquadro grigio. */
html .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-section-not-contained) {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard):not(:first-child) {
    border-top: 1px solid var(--ds-row-divider, #EEF0F4) !important;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-header {
    padding: 10px 0 2px !important;
    background: transparent !important;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4);
    font-weight: 600;
    color: var(--ds-text-secondary, #3F3F46);
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-content-ctn > .fi-section-content {
    padding: 8px 0 10px !important;
}

@media (max-width: 640px) {
    html .fi-section.jo-fstep > .fi-section-header {
        padding-left: 46px !important;
    }

    html .fi-section.jo-fstep > .fi-section-header::before {
        left: 11px;
        width: 24px;
        height: 24px;
    }

    html .fi-section.jo-fstep::after {
        left: 23px;
    }

    html .fi-section.jo-fstep:not(.jo-fstep-plain) > .fi-section-content-ctn > .fi-section-content {
        padding-left: 14px;
    }
}

/* ── Passi in fila su una linea (.jo-ftl, FormCards::isTimeline) ──
 * Preventivatore (owner 3-nov-2026, punto 14, mockup v3): card sempre aperte
 * una sotto l'altra; a lato, in una colonna di 56px, il punto all'altezza del
 * titolo e la linea che le unisce attraverso lo spazio fra le card, lime dove
 * il percorso è fatto; accanto al titolo il numero e lo stato in testo
 * semplice. Stato del punto e della linea da form-steps.js (data-jo-state,
 * data-jo-prev). Le card-passo «come gli accordion» qui sotto non valgono. */
:is(.fi-form, form) .fi-fo-component-ctn:has(> div .fi-section.jo-ftl) {
    row-gap: 14px !important;
}

html .fi-section.fi-section.jo-fstep.jo-ftl[data-jo-state],
html .fi-section.fi-section.jo-fstep.jo-ftl {
    --jo-ftl-up: var(--ds-border, #DFE2EA);
    --jo-ftl-down: var(--ds-border, #DFE2EA);
    padding-left: 56px;
    border: 1px solid var(--ds-border, #DFE2EA) !important;
    border-radius: 14px !important;
    background: var(--ds-surface, #FCFCFD) !important;
    box-shadow: none !important;
}

/* In scuro --ds-border sparisce sul fondo della card: linea e punto da
   compilare col grigio dei separatori (4-nov-2026). Prima degli stati, che
   restano viola e lime. */
html.dark .fi-section.fi-section.jo-fstep.jo-ftl {
    --jo-ftl-up: var(--ds-divider-dashed);
    --jo-ftl-down: var(--ds-divider-dashed);
}

html.dark .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header::before {
    border-color: var(--ds-divider-dashed);
}

html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header {
    min-height: 0;
    padding: 20px 22px 0 4px !important;
    border-bottom: 0 !important;
    background: transparent !important;
}

/* Il punto: vuoto da compilare, viola dove si lavora, lime con la spunta se fatto. */
html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header::before {
    content: "";
    left: -37px;
    top: 22px;
    margin-top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--ds-border-strong, #C9CDD8);
    background: var(--ds-surface, #FCFCFD);
    box-shadow: none;
    color: var(--ds-lime-fg, #2A3300);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

html .fi-section.fi-section.jo-fstep.jo-ftl:is([data-jo-state="current"], [data-jo-state="partial"]) > .fi-section-header::before {
    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);
}

/* Completato in verde vero, non nel lime JOORNA (owner 5-nov-2026). */
html .fi-section.fi-section.jo-fstep.jo-ftl[data-jo-state="done"] > .fi-section-header::before {
    content: "✓";
    border-color: var(--ds-step-done-ring);
    background: var(--ds-ok-bg);
    color: var(--ds-ok-fg);
}

/* La linea: sopra il punto il tratto che arriva dal passo prima, sotto quello
   che porta al passo dopo, attraverso i 14px fra le card. */
html .fi-section.fi-section.jo-fstep.jo-ftl::after {
    content: "";
    display: block;
    position: absolute;
    left: 27px;
    top: -1px;
    bottom: -15px;
    height: auto;
    width: 2px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--jo-ftl-up) 0 23px, transparent 23px 41px, var(--jo-ftl-down) 41px 100%);
}

html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-first {
    --jo-ftl-up: transparent;
}

html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-last::after {
    bottom: auto;
    height: 23px;
}

html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-only::after {
    display: none;
}

html .fi-section.fi-section.jo-fstep.jo-ftl[data-jo-state="done"] {
    --jo-ftl-down: var(--ds-step-done-ring);
}

html .fi-section.fi-section.jo-fstep.jo-ftl[data-jo-prev="done"] {
    --jo-ftl-up: var(--ds-step-done-ring);
}

/* Titolo --ds-fs-h3 (16px) / 600; accanto il numero, poi lo stato in testo semplice. */
html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    font-size: var(--ds-fs-h3) !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: var(--ds-text-primary, #18181B);
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading::before {
    content: counter(jo-fstep, decimal-leading-zero);
    font-size: 12px;
    font-weight: 500;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-variant-numeric: tabular-nums;
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-description {
    margin-top: 2px;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: var(--ds-text-tertiary, #5B5B6B) !important;
    white-space: normal;
}

html .fi-section.jo-ftl > .fi-section-header .jo-fstep-summary {
    display: none !important;
}

html .fi-section.jo-ftl .jo-fstep-badge {
    height: auto;
    padding: 0;
    border: 0 !important;
    background: none !important;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 12.5px;
    font-weight: 400;
}

html .fi-section.jo-ftl .jo-fstep-badge::before {
    display: none;
}

html .fi-section.jo-ftl .jo-fstep-badge:is([data-state="current"], [data-state="partial"]) {
    color: var(--ds-accent-fg, #5E00D6);
}

html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-content-ctn {
    border: 0 !important;
}

html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-content-ctn > .fi-section-content {
    padding: 14px 22px 22px 4px !important;
}

/* Una parte del passo, sotto la linea tratteggiata (es. Trattamento e preferenza). */
html .fi-section.jo-ftl .jo-qpart {
    padding-top: 14px;
    border-top: 1px solid var(--ds-border);
}

/* Gli interruttori in fila, con aria fra l'uno e l'altro. */
html .fi-section.jo-ftl .jo-fr-toggles > .fi-fo-component-ctn {
    column-gap: 28px !important;
    row-gap: 2px !important;
}

@media (max-width: 640px) {
    html .fi-section.fi-section.jo-fstep.jo-ftl {
        padding-left: 40px;
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header {
        padding: 18px 14px 0 2px !important;
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header::before {
        left: -29px;
        top: 20px;
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl::after {
        left: 19px;
        background: linear-gradient(to bottom, var(--jo-ftl-up) 0 21px, transparent 21px 39px, var(--jo-ftl-down) 39px 100%);
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-last::after {
        height: 21px;
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-content-ctn > .fi-section-content {
        padding: 12px 14px 18px 2px !important;
    }
}

/* ── Azioni del form: piede fisso, Annulla a sinistra, CTA a destra ── */

:is(.fi-resource-create-record-page, .fi-resource-edit-record-page) .fi-form-actions .fi-ac {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

:is(.fi-resource-create-record-page, .fi-resource-edit-record-page) .fi-form-actions .fi-ac > button:last-child,
:is(.fi-resource-create-record-page, .fi-resource-edit-record-page) .fi-form-actions .fi-ac > a:last-child,
:is(.fi-resource-create-record-page, .fi-resource-edit-record-page) .fi-form-actions .fi-ac > div:last-child {
    margin-right: auto;
}

/* Piede fisso largo come le card del contenuto (owner 21-ott-2026): Filament
   lo allarga di 16px per lato (-mx-4) e sbordava dalla colonna. Sul telefono
   resta a tutta larghezza (mobile.css). */
@media (min-width: 768px) {
    html .fi-form-actions.fi-sticky {
        margin-inline: 0;
    }
}

/* ── Impostazioni decise dal gruppo o da Joorna (components/jo/group-managed)
 * Nota compatta: chi decide, cosa (testo semplice, dettagli nel tooltip),
 * dove si cambia. */
.jo-gm {
    border: 1px solid var(--ds-border, #D9DCE3);
    border-radius: var(--ds-radius-control, 8px);
    background: var(--ds-surface-sunken, #F1F2F5);
    font-size: 13px;
}

.jo-gm-block {
    padding: 10px 12px;
}

.jo-gm-block + .jo-gm-block {
    border-top: 1px solid var(--ds-row-divider, #E6E8ED);
}

.jo-gm-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ds-text-secondary, #3F3F46);
}

.jo-gm-head b {
    color: var(--ds-text-primary, #18181B);
    font-weight: 600;
}

.jo-gm-lock {
    flex: none;
    width: 14px;
    height: 14px;
    color: var(--ds-text-tertiary, #5B5B6B);
}

.jo-gm-link {
    margin-left: auto;
    color: var(--ds-text-link, #5F45A8);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}

.jo-gm-link:hover {
    text-decoration: underline;
}

.jo-gm-items {
    margin: 4px 0 0 22px;
    line-height: 1.6;
    padding: 0;
    list-style: none;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 12.5px;
}

.jo-gm-items li {
    display: inline;
    cursor: help;
}

.jo-gm-items li:not(:last-child)::after {
    content: ", ";
}

.jo-gm-value {
    color: var(--ds-text-secondary, #3F3F46);
}

.jo-gm-note {
    margin: 4px 0 0 22px;
    overflow: hidden;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 12.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ── Wizard (es. "Crea con AI" dei modelli email): passi in colonna ──
 * Come le card-passo: 1, 2, 3, 4 uno sotto l'altro lungo una linea
 * sottile, a sinistra del contenuto del passo; mai la fila orizzontale di
 * Filament. Passo attivo lilla, fatti con la spunta. Su schermi stretti i
 * passi restano in colonna sopra il contenuto. */
.fi-fo-wizard:has(> .fi-fo-wizard-header) {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
}

.fi-fo-wizard > .fi-fo-wizard-header {
    position: sticky;
    top: 0;
    grid-column: 1;
    grid-row: 1 / span 40;
    display: flex !important;
    flex-direction: column;
    padding: 6px 0;
    overflow: visible !important;
    border: 1px solid var(--ds-border, #D4D8E0);
    border-radius: var(--ds-radius-card, 12px);
    background: var(--ds-surface-sunken, #EDEFF3);
}

.fi-fo-wizard > :not(.fi-fo-wizard-header) {
    grid-column: 2;
    min-width: 0;
}

.fi-fo-wizard > .fi-fo-wizard-header > li {
    border: 0 !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step-separator {
    display: none !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step-button {
    width: 100%;
    gap: 10px !important;
    padding: 8px 14px !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step-icon-ctn {
    width: 28px !important;
    height: 28px !important;
}

/* Passi non ancora fatti: cerchio chiaro (quelli fatti restano pieni con la spunta). */
.fi-fo-wizard .fi-fo-wizard-header-step-icon-ctn:not([class*="bg-primary"]) {
    background: var(--ds-surface, #F6F7F9);
}

.fi-fo-wizard .fi-fo-wizard-header-step-indicator {
    font-size: 12px !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step-icon {
    width: 15px !important;
    height: 15px !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step-label {
    font-size: 13px !important;
}

.fi-fo-wizard .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-button {
    background: var(--ds-accent-soft, #F3EEFC);
}

/* La linea che unisce i passi, dal cerchio di uno al successivo. */
.fi-fo-wizard > .fi-fo-wizard-header > li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 38px;
    bottom: -6px;
    left: 27.5px;
    width: 1px;
    background: var(--ds-border, #D4D8E0);
    pointer-events: none;
}

@media (max-width: 640px) {
    .fi-fo-wizard:has(> .fi-fo-wizard-header) {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 12px;
    }

    .fi-fo-wizard > .fi-fo-wizard-header {
        position: static;
        grid-row: auto;
    }

    .fi-fo-wizard > :not(.fi-fo-wizard-header) {
        grid-column: 1;
    }
}

/* Link della Scheda hotel («Apri la libreria», filament.hotels.sheet-media):
   viola, con la freccetta piccola. Il biglietto da visita che li usava non
   c'è più: il riepilogo dell'hotel sta nella testata viola (owner 10-nov-2026,
   filament.hotels.sheet-summary, .jo-hsum in hotel-workspace.css). */
.jo-hcard-link { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; color: var(--ds-text-link, #5F45A8); }
.jo-hcard-link svg { width: 13px; height: 13px; }

/* L'anteprima delle creazioni nella testata viola (owner 11-nov-2026, «come la
   Scheda hotel»; LiveSummaryBand, filament.guests.create-live-summary,
   filament.quotes.request-live-summary): il nome nel titolo, sotto due righe di
   dati sopra .jo-hsum. Quello che manca ancora si legge attenuato; nella
   seconda riga il pallino dice lo stato (verde c'è o dato, rosso negato). */
.fi-header-subheading:has(.jo-bsum) { max-width: none !important; }
.jo-bsum { display: flex; flex-direction: column; gap: 2px; }
.jo-bsum .jo-hsum-item { display: inline-flex; align-items: center; gap: 5px; }
.jo-bsum .jo-hsum-item > svg { width: 14px; height: 14px; flex: none; opacity: .85; }
.jo-bsum .jo-bsum-long { min-width: 0; max-width: 42ch; }
.jo-bsum .jo-bsum-long > span { overflow: hidden; text-overflow: ellipsis; }
.jo-bsum-dot { width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--ds-off-dot, #8A8A99); }
.jo-bsum .is-on > .jo-bsum-dot { background: var(--ds-ok-dot); }
.jo-bsum .is-off > .jo-bsum-dot { background: var(--ds-err-dot); }
.jo-bsum-name { font-weight: inherit; }
.jo-bsum-states { column-gap: 16px; }
/* I dati nella testata viola più evidenti della frase di descrizione (owner
   11-nov-2026: «troppo chiare»): il testo chiaro del menu, non il grigio
   attenuato del sottotitolo. Vale anche per il riepilogo della Scheda hotel. */
html body .fi-page > section .fi-header .fi-header-subheading .jo-hsum .jo-hsum-item,
html body .fi-page > section .fi-header .fi-header-subheading .jo-hsum .jo-hsum-item span { color: var(--ds-side-fg-strong) !important; }
.fi-header-subheading .jo-hsum-item { font-weight: 500; }
.jo-bsum .jo-hsum-item.is-dim { opacity: .72; font-weight: 400; }
.jo-bsum-states > .jo-hsum-item::before { content: none; }

/* Testo per l'ospite in più lingue (BookingGuestSettingsTab::multilingualText):
   sulla riga dell'etichetta, a destra, il globo col numero di lingue scritte apre
   le altre lingue affiancate; cosa manca nel tooltip (owner 11-nov-2026, al posto
   della scritta «Traduzioni · mancano … ⌄»). */
.jo-ml-toggle { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border-radius: 6px; color: var(--ds-text-tertiary); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jo-ml-toggle:hover, .jo-ml-toggle[aria-expanded="true"] { background: var(--ds-accent-soft); color: var(--ds-accent); }
.jo-ml-toggle .jo-ml-globe { width: 16px; height: 16px; }
.jo-ml-toggle .jo-ml-count.is-missing { color: var(--ds-warn-fg, #8A4B00); }
.jo-ml > .fi-fo-component-ctn { row-gap: 8px; }

/* ── Standard rapido dei form (owner 1-ott-2026): meno rumore ───────────
 * Sezioni interne di una card: niente icone decorative, descrizione breve
 * (al massimo due righe), testi d'aiuto piccoli. Dentro uno step nessun
 * altro numero: la numerazione è solo dei passi principali. */
html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-header .fi-section-header-icon {
    display: none;
}

html .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-header .fi-section-header-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ds-text-tertiary, #5B5B6B);
}

.fi-fo-field-wrp-helper-text {
    font-size: 12px !important;
    line-height: 1.4;
    color: var(--ds-text-tertiary, #5B5B6B) !important;
}

html .fi-section.jo-fstep .fi-section.jo-fstep > .fi-section-header::before,
html .fi-section.jo-fstep .fi-section.jo-fstep::after {
    display: none !important;
}

html .fi-section.jo-fstep .fi-section.jo-fstep > .fi-section-header {
    padding-left: 14px !important;
}

/* ── Infopoint "i" (hint.blade.php di field-wrapper / entry-wrapper) ──
   Minimal: un piccolo "i" outline subito accanto all'etichetta, tenue,
   che si accende al passaggio; tooltip compatto scuro a contrasto. */

/* La riga dell'etichetta del field-wrapper (flex items-center gap-x-3). */
.gap-x-3:has(> .jo-info-hint:not(.jo-info-hint--with)):not(.justify-end) {
    justify-content: flex-start;
    column-gap: 4px;
}

.jo-info-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

/* Icona da 18px (era 14, owner 12-ott-2026: "piccolissima"); il margine
   negativo tiene la riga dell'etichetta alta come prima. */
.jo-info {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: -4px 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ds-text-placeholder, #6B6B7B);
    cursor: help;
    transition: color .15s, background-color .15s;
}

.jo-info-icon {
    width: 18px;
    height: 18px;
}

.jo-info:hover,
.jo-info[aria-expanded="true"] {
    color: var(--ds-accent, #7C5CCB);
    background: var(--ds-accent-soft, #F3EEFC);
}

.jo-info:focus-visible {
    outline: none;
    box-shadow: var(--ds-focus-ring);
}

.tippy-box[data-theme~='jo-info'] {
    background: var(--ds-tooltip-bg);
    color: var(--ds-tooltip-fg);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    border-radius: 8px;
    box-shadow: 0 6px 20px -6px rgb(15 17 23 / .35);
}

.tippy-box[data-theme~='jo-info'] > .tippy-content {
    padding: 7px 10px;
}

.tippy-box[data-theme~='jo-info'] > .tippy-arrow {
    color: var(--ds-tooltip-bg);
}

/* ── Accordion dentro le card e fuori dallo standard dei form (owner
 * 5-ott-2026: "rendiamoli così in tutta la piattaforma") ──
 * Ogni sezione chiudibile che non è una card-passo (sezioni espandibili
 * dentro una card: segmenti, chatbot della struttura, filtri avanzati; e le
 * sezioni chiudibili delle pagine scritte a mano) ha lo stesso disegno degli
 * accordion delle schede e del dettaglio del Preventivatore, solo più
 * compatto: card con bordo e ombra di riposo, testata con l'icona in una
 * tessera lilla tenue (se la sezione ne ha una), titolo 600, descrizione di
 * una riga, freccia a destra; al passaggio si solleva; aperta = bordo lilla,
 * testata lilla tenue e un filetto sotto. Mai numeri. */
html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]),
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) {
    border: 1px solid var(--ds-border) !important;
    border-radius: 10px !important;
    background: var(--ds-surface) !important;
    box-shadow: var(--ds-shadow-rest) !important;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]).fi-collapsed:hover,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]).fi-collapsed:hover {
    border-color: var(--ds-border-strong) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]):not(.fi-collapsed),
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]):not(.fi-collapsed) {
    border-color: var(--ds-step-current-bd) !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]) > .fi-section-header,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) > .fi-section-header {
    min-height: 50px;
    padding: 10px 14px !important;
    background: transparent !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]):not(.fi-collapsed) > .fi-section-header,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]):not(.fi-collapsed) > .fi-section-header {
    border-bottom: 1px solid var(--ds-step-current-bd);
    background: var(--ds-section-open-head) !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]) > .fi-section-content-ctn > .fi-section-content,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) > .fi-section-content-ctn > .fi-section-content {
    padding: 12px 14px 14px !important;
}

/* Niente icona negli accordion (owner 5-ott-2026): vedi la regola unica in fondo. */

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]) > .fi-section-header .fi-section-header-heading,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--ds-text-primary);
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]) > .fi-section-header .fi-section-header-description,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) > .fi-section-header .fi-section-header-description {
    margin-top: 1px;
    overflow: hidden;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    color: var(--ds-text-tertiary) !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html body .fi-section.jo-fcard .fi-section.fi-section:not(.jo-fcard):not(.fi-aside):has(> header[x-on\:click]) > .fi-section-header :is(.fi-icon-btn, button[x-on\:click]) svg,
html body .fi-section.fi-section.fi-section:not(.jo-fcard):not(.fi-aside):not(.fi-modal .fi-section):has(> header[x-on\:click]) > .fi-section-header :is(.fi-icon-btn, button[x-on\:click]) svg {
    width: 18px;
    height: 18px;
    color: var(--ds-text-tertiary);
}

/* Fra due sezioni espandibili un passo stretto, non un filetto. */
html .fi-section.jo-fcard .fi-section:not(.jo-fcard):has(> header[x-on\:click]) + .fi-section,
html .fi-section.jo-fcard .fi-section:not(.jo-fcard):has(> header[x-on\:click]):not(:first-child) {
    margin-top: 0;
}

/* Controlli: un filo più chiari della card (si distinguono dal fondo),
 * bordo sottile, placeholder tenue, focus lilla con un alone discreto. */
html .fi-input-wrp,
html .fi-fo-select .choices__inner,
html .fi-fo-tags-input {
    background-color: var(--ds-field-bg, #FCFCFD) !important;
}

html .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px var(--ds-field-focus-halo, rgba(124, 92, 203, .14)) !important;
}

html .fi-input::placeholder,
html .fi-fo-textarea textarea::placeholder,
html .fi-fo-select .choices__placeholder {
    color: var(--ds-text-placeholder, #6B6B7B) !important;
    opacity: .85;
}

/* Sezione vuota: empty state compatto, la CTA subito sotto il testo. */
html .fi-section.jo-fcard .fi-ta-empty-state {
    padding: 20px 16px !important;
}

html .fi-section.jo-fcard .fi-ta-empty-state .fi-ta-empty-state-content {
    gap: 6px;
}

html .fi-section.jo-fcard .fi-ta-empty-state-icon-ctn {
    padding: 8px;
}

/* Immagine già caricata (logo, banner) in un form: una miniatura, non la
   foto a tutta card. Clic = si apre a grandezza reale. */
.jo-asset-thumb {
    display: inline-flex;
    vertical-align: top;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 64px;
    border: 1px solid var(--ds-border, #D4D8E0);
    border-radius: var(--ds-radius-control, 8px);
    background: var(--ds-surface-sunken, #EDEFF3);
    transition: border-color .15s;
}

.jo-asset-thumb:hover {
    border-color: var(--ds-accent, #7C5CCB);
}

.jo-asset-thumb img {
    display: block;
    width: 100%;
    height: 100%;
}

.jo-asset-thumb--banner,
.jo-asset-thumb--cover {
    width: 96px;
}

.jo-asset-thumb--banner img,
.jo-asset-thumb--cover img {
    object-fit: cover;
}

.jo-asset-thumb--logo {
    min-width: 64px;
    max-width: 96px;
    padding: 6px;
}

.jo-asset-thumb--logo img {
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.jo-asset-thumb--empty {
    width: 64px;
    border-style: dashed;
    color: var(--ds-text-placeholder, #6B6B7B);
}

.jo-asset-thumb--empty svg {
    width: 22px;
    height: 22px;
}

.jo-asset-thumb--empty:hover {
    border-color: var(--ds-border, #D4D8E0);
}

/* Immagine attuale | Carica nuovo, affiancati e alti uguali (64px), in un
   quarto di riga (owner 10-nov-2026); l'etichetta sta sopra la miniatura e
   il caricamento si allinea in basso. L'interruttore "Rimuovi" sotto, su
   tutta la riga. */
.jo-asset-field > .fi-fo-component-ctn {
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 12px 12px !important;
    align-items: end;
}

.jo-asset-field > .fi-fo-component-ctn > div:nth-child(n + 3) {
    grid-column: 1 / -1 !important;
}

.jo-asset-field > .fi-fo-component-ctn > div:nth-child(-n + 2) {
    grid-column: auto !important;
}

@media (max-width: 480px) {
    .jo-asset-field > .fi-fo-component-ctn {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Hotel nuovo (Registra hotel): niente anteprima attuale, il caricamento prende tutta la colonna. */
.jo-asset-field > .fi-fo-component-ctn:not(:has(.jo-asset-thumb)) {
    grid-template-columns: minmax(0, 1fr) !important;
}

/* ── Caricamenti (tutta la piattaforma): riquadro compatto alto 64px,
   come la miniatura dell'immagine caricata (imagePreviewHeight 64,
   AppServiceProvider). ── */
.fi-fo-file-upload .filepond--root {
    margin-bottom: 0;
    font-size: 13px;
}

.fi-fo-file-upload .filepond--drop-label {
    min-height: 64px;
}

.fi-fo-file-upload .filepond--drop-label label {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
}

/* ── Ripetitore in riga (.jo-repeater-inline, es. recapiti secondari):
   ogni elemento è una riga sola (campi · elimina), "+ Aggiungi" sulla riga
   dell'etichetta invece che centrato sotto. ── */
.fi-fo-field-wrp:has(.jo-repeater-inline) {
    position: relative;
}

.jo-repeater-inline > div:last-child:not(:has(ul)) {
    position: absolute;
    top: -1px;
    right: 0;
}

.jo-repeater-inline > div:last-child:not(:has(ul)) .fi-link {
    font-size: 12.5px;
}

.jo-repeater-inline .fi-fo-repeater-item {
    display: flex;
    align-items: center;
    border-radius: var(--ds-radius-control, 8px) !important;
    box-shadow: none !important;
    border: 1px solid var(--ds-border, #D4D8E0);
    background: var(--ds-surface, #F6F7F9) !important;
}

.jo-repeater-inline .fi-fo-repeater-item > * {
    border-top-width: 0 !important;
}

.jo-repeater-inline .fi-fo-repeater-item-header {
    order: 2;
    flex: none;
    padding: 0 8px 0 0 !important;
}

.jo-repeater-inline .fi-fo-repeater-item-content {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px !important;
}

.jo-repeater-inline .fi-fo-repeater-item-content .fi-fo-component-ctn {
    gap: 8px !important;
    align-items: center;
}

/* ── Dati in sola lettura su una riga (.jo-inline-facts): "Indirizzo IT ·
   Sorgente TeamSystem · ID …" in fondo alla card, non campi alti. ── */
.jo-inline-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 18px;
    padding-top: 10px;
    border-top: 1px solid var(--ds-row-divider, #EEF0F4);
    font-size: 12.5px;
    color: var(--ds-text-secondary, #3F3F46);
}

.jo-inline-facts-k,
.jo-inline-facts-note {
    color: var(--ds-text-tertiary, #5B5B6B);
}

.jo-inline-facts-k {
    margin-right: 2px;
}

/* Editor di testo: parte basso (7rem, cresce scrivendo); .jo-rich-short
   per i campi da una o due righe (descrizioni). */
.fi-fo-rich-editor trix-editor {
    min-height: 7rem !important;
}

.fi-fo-rich-editor trix-editor.jo-rich-short {
    min-height: 4.5rem !important;
}

/* Liste ripetibili: elementi vicini (6px), non 16px. */
.fi-fo-repeater > ul > .grid {
    gap: 6px !important;
}

.fi-fo-repeater {
    row-gap: 8px !important;
}

/* Fieldset dentro una card: un gruppo di campi, non un riquadro grigio
   nella card — titolo discreto e filetto, come i blocchi interni. Il filetto
   è un'ombra e non il bordo: il browser apre il bordo dove sta la legend, e
   spostata la legend sotto restava un buco sopra il titolo (2-nov-2026). */
html .fi-section.jo-fcard .fi-fieldset {
    margin-top: 2px;
    padding: 30px 0 0 !important;
    border: 0 !important;
    box-shadow: inset 0 1px 0 var(--ds-row-divider, #EEF0F4) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

html .fi-section.jo-fcard .fi-fieldset > legend {
    margin-inline-start: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ds-text-secondary, #3F3F46);
    transform: translateY(1.35rem);
}

/* ── Sezione in compilazione (tutta la piattaforma, owner 2-ott-2026): vale
   per le card-passo dei form di creazione e per OGNI sezione espandibile
   (accordion) di qualsiasi form — impostazioni, schede, filtri dei
   segmenti, chatbot della struttura… Mentre il cursore è in un campo della
   sezione aperta, lei resta in rilievo e il resto della pagina si oscura
   (un velo fisso sotto la sezione): si capisce subito cosa si sta
   compilando. Salva/Annulla restano in chiaro; topbar e sidebar, che stanno
   sopra il velo, si scuriscono dello stesso tono. I modali hanno il loro
   sfondo: lì il velo non serve. Sezione espandibile = quella con
   x-on:collapse-section (Filament la mette solo alle collapsible).
   Dal 2-ott (owner) il velo scatta appena la sezione è APERTA, non solo
   quando si scrive: ci si concentra su quella. Le card del carosello delle
   modifiche animate ([data-jo-wheel]) sono sempre aperte: lì scatta quando
   si compila. Contano solo le sezioni aperte e visibili: una sezione interna
   rimasta aperta dentro un passo chiuso o in un tab nascosto non scurisce
   niente; chiuso l'accordion, il velo sparisce. ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9;
    background: var(--ds-focus-veil, rgb(15 17 23 / .12));
    opacity: 0;
    pointer-events: none;
    transition: opacity .32s cubic-bezier(.16, 1, .3, 1);
}

/* body.jo-focus-open / .jo-focus-only / .jo-focus-wheel le mette form-steps.js
   (stesse condizioni di prima, con querySelector): con body:has(...) Chrome
   riscandiva tutta la pagina a ogni ricalcolo dello stile, anche nelle
   pagine senza sezioni (28-ott-2026). */
body.jo-focus-open::after {
    opacity: 1;
}

/* Due selettori e non un :is(): con :is() come soggetto Chrome prova la
   regola su ogni elemento della pagina a ogni ricalcolo dello stile. */
.fi-section:is(.jo-fstep, [x-on\:collapse-section\.window]):not(.fi-collapsed, .jo-ftl, .fi-modal-window .fi-section, [data-jo-wheel], .fi-collapsed .fi-section, .fi-fo-tabs-tab:not(.fi-active) .fi-section),
.fi-section[data-jo-wheel]:focus-within {
    position: relative;
    z-index: 10;
    box-shadow: var(--ds-focus-raise, 0 14px 32px -18px rgb(15 17 23 / .22), 0 1px 4px -1px rgb(15 17 23 / .06)) !important;
}

body.jo-focus-open .fi-form-actions {
    z-index: 11;
}

body.jo-focus-open .fi-form-actions:not(.fi-sticky) {
    position: relative;
}

/* I menu della testata della pagina ("Altre azioni") e le tendine del menu
   orizzontale (es. Addestra il chatbot ▸ Documenti, owner 29-ott-2026) stanno
   sopra la sezione aperta in rilievo (z-index 10) e il velo (9), sotto la topbar
   (20): prima l'elenco si apriva sotto la card (19-ott-2026). */
html body .fi-header .fi-dropdown-panel,
html body .fi-page-sub-navigation-tabs .fi-dropdown-panel {
    z-index: 12 !important;
}

/* Una tendina o un calendario aperti stanno sopra il piede fisso (Annulla /
   Salva): prima il piede copriva l'ultima riga del calendario e un clic sui
   giorni in fondo al mese lo chiudeva senza scegliere. Il pannello del
   calendario aperto non ha display:none (x-float). */
html body .fi-section:is(.jo-fstep, [x-on\:collapse-section\.window]):has(.choices.is-open, .fi-fo-date-time-picker-panel:not([style*="display: none"])) {
    z-index: 12 !important;
}

/* Fuori da una card che fa da livello il calendario sta comunque sopra il piede. */
html body .fi-main .fi-fo-date-time-picker-panel {
    z-index: 20;
}

/* Form con una card sola (es. lead/chiavi-api-lead/create, widget-chat/create):
   niente velo né rilievo, non c'è altro da attenuare (audit ott-2026). Il piede
   fisso resta quello delle altre creazioni. */
body.jo-focus-only::after {
    opacity: 0;
}

body.jo-focus-only .fi-sidebar {
    filter: none;
}

.fi-section.jo-fstep.jo-fstep-only {
    box-shadow: var(--ds-shadow-rest) !important;
}

/* L'anteprima a destra (HasSidePreview) resta in chiaro sopra il velo: si
   guarda mentre si compila (owner 6-ott-2026). */
.jo-sp-side {
    z-index: 10;
}

@media (max-width: 1279px) {
    .jo-sp-side {
        position: relative;
    }
}

.fi-sidebar {
    transition: filter .32s cubic-bezier(.16, 1, .3, 1);
}

body.jo-focus-open .fi-sidebar {
    filter: var(--ds-focus-veil-filter, brightness(.93));
}

/* La topbar si scurisce con un velo sopra, non con filter: un filter la fa
   diventare il riferimento delle cose a posizione fissa che contiene, e il
   menu dell'account e la finestra delle notifiche finivano fuori dallo
   schermo (card 1amdj41jvqe, 12-nov-2026). Stesso tono della sidebar; i menu
   aperti (z-index 10) e le finestre stanno sopra il velo. Lo accendono anche
   la riga aperta delle tabelle e la domanda aperta del modulo del soggiorno. */
.fi-topbar::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    background: var(--ds-focus-veil-shade, rgb(0 0 0 / .07));
    opacity: 0;
    pointer-events: none;
    transition: opacity .32s cubic-bezier(.16, 1, .3, 1);
}

body.jo-focus-open:not(.jo-focus-only) .fi-topbar::after {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    body::after,
    .fi-topbar::after,
    .fi-sidebar {
        transition: none;
    }
}

/* ── Accordion delle schede e delle impostazioni (owner 2-ott/5-ott-2026) ──
   Le card chiudibili delle schede (Scheda hotel, Scheda struttura…,
   .jo-fstep-plain) e delle pagine di impostazioni. Il 2-ott erano diventate
   troppo leggere ("troppo piatte", 5-ott): ora sono vere card — bordo
   pieno, ombra di riposo, testata ariosa senza icona, titolo 600 —; chiusa = una riga ben distinta che al
   passaggio si solleva; aperta = bordo lilla, ombra un filo più alta,
   testata appena lilla e un filetto sotto. I passi numerati dei form di
   creazione hanno lo stesso disegno col numero (ultimo blocco). Specificità alta:
   deve battere la regola delle card di design-system.css. */
html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) {
    border-radius: 12px !important;
    box-shadow: var(--ds-shadow-rest) !important;
    border: 1px solid var(--ds-border) !important;
    background: var(--ds-surface) !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]).fi-collapsed:hover {
    border-color: var(--ds-border-strong) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]):not(.fi-collapsed) {
    border-color: var(--ds-step-current-bd) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header {
    min-height: 60px;
    /* Senza descrizione il titolo sta al centro, non in alto con un vuoto sotto (22-ott-2026). */
    justify-content: center;
    padding: 12px 16px !important;
    background: transparent !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]):not(.fi-collapsed) > .fi-section-header {
    border-radius: 11px 11px 0 0;
    background: var(--ds-section-open-head) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h3) !important;
    font-weight: 600 !important;
    color: var(--ds-text-primary);
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header .fi-section-header-description {
    margin-top: 2px;
    overflow: hidden;
    font-size: 12.5px !important;
    color: var(--ds-text-tertiary) !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header :is(.fi-icon-btn, button[x-on\:click]) svg {
    width: 18px;
    height: 18px;
    color: var(--ds-text-tertiary);
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]):not(.fi-collapsed) > .fi-section-content-ctn {
    border-top: 1px solid var(--ds-border) !important;
}
html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header .fi-section-header-heading,
html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header .fi-section-header-description { line-height: 1.35 !important; }
html body .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-fcard:is(.jo-fstep-plain, :not(.jo-fstep)[x-on\:collapse-section\.window]) > .fi-section-header > div { gap: 12px !important; }

/* Campi spenti (es. finché "Dichiaro queste informazioni" non è attiva):
 * interruttori e caselle si vedono davvero disattivati, non cliccabili per finta. */
html .fi-fo-field-wrp button[role="switch"]:disabled,
html .fi-fo-field-wrp input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
/* Anche campi e scelte Sì/No (11-nov-2026, Registra hotel: «sembrano attivi»). */
html .fi-fo-field-wrp .fi-input-wrp.fi-disabled,
html .fi-fo-field-wrp .fi-fo-toggle-buttons:has(input:disabled) { opacity: .55; cursor: not-allowed; }

/* Rimando alla spunta "Dichiaro queste informazioni" (BookingGuestSettingsTab::undeclaredNotice). */
html .jo-undeclared-note { font-size: 12.5px; color: var(--ds-text-tertiary); }

/* Un campo nascosto (Hidden) non prende una cella della griglia: niente buchi nelle righe. */
html .fi-fo-component-ctn > div:has(> input[type="hidden"]:only-child) { display: none; }

/* Righe semplici di un ripetitore (.jo-rows-repeater, es. Email interne):
 * campi in riga come un normale form, senza riquadro per ogni voce; il
 * cestino accanto all'ultimo campo; "+ Aggiungi" discreto sotto. */
html .jo-rows-repeater .fi-fo-repeater-item {
    position: relative;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
html .jo-rows-repeater .fi-fo-repeater-item > .fi-fo-repeater-item-header {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    height: 34px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
html .jo-rows-repeater .fi-fo-repeater-item > .fi-fo-repeater-item-content {
    padding: 0 40px 0 0 !important;
    border: 0 !important;
}
html .jo-rows-repeater ul { gap: 8px 16px !important; }

/* ══ Prova "form v2" (owner 2-ott-2026), solo dove il body ha .jo-form-v2
   (oggi Registra hotel e Scheda hotel). Le
   sue sezioni (Contatti e accesso, Dati fiscali, Indirizzo…) diventano card
   staccate e in rilievo, ognuna con il suo stato in testata; i campi si
   colorano mentre si compilano (public/js/form-sections-status.js). ══ */
/* Owner 8-ott-2026: l'accordion aperto delle schede hotel è uguale a tutti gli
   altri (fondo bianco, stessi margini): niente fondo più scuro qui. */

/* Le sezioni del passo: card fluttuanti. */
html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 12px !important;
    background: var(--ds-surface) !important;
    box-shadow: 0 1px 2px rgba(20, 22, 40, .05), 0 10px 24px -14px rgba(20, 22, 40, .22) !important;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section::before { display: none !important; }

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section:focus-within {
    border-color: var(--ds-step-current-bd) !important;
    box-shadow: 0 0 0 3px var(--ds-field-focus-halo), 0 14px 30px -14px rgba(124, 92, 203, .35) !important;
}

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section > .fi-section-header {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--ds-row-divider) !important;
    background: transparent !important;
}

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
    font-weight: 600 !important;
}

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section > .fi-section-content-ctn > .fi-section-content {
    padding: 14px 16px 16px !important;
}

/* Stato della card: filetto a sinistra colorato. */
html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section[data-jo-status="done"] {
    border-color: var(--ds-ok-bd) !important;
    box-shadow: inset 3px 0 0 var(--ds-ok-dot), 0 1px 2px rgba(20, 22, 40, .05), 0 10px 24px -14px rgba(20, 22, 40, .22) !important;
}

html body.jo-form-v2.jo-form-v2 .fi-section.jo-fstep.jo-fcard .fi-section-content .fi-section.fi-section.fi-section[data-jo-status="error"] {
    border-color: var(--ds-err-bd) !important;
    box-shadow: inset 3px 0 0 var(--ds-err-dot), 0 1px 2px rgba(20, 22, 40, .05), 0 10px 24px -14px rgba(161, 26, 26, .25) !important;
}

/* Un campo bloccato (es. «Dichiaro queste informazioni» spenta) si vede
   grigio, non come un campo da compilare (owner 10-nov-2026: «la tendina non
   funziona»). Il perché lo dice l'avviso «Campi spenti» sopra. */
html .jo-sec-page .fi-input-wrp:has(:is(input, select, textarea, button):disabled),
html .jo-sec-page .fi-input-wrp.fi-disabled {
    background: var(--ds-surface-sunken) !important;
    opacity: .75;
}

/* Stato accanto al titolo della card: pallino e testo, senza pill (owner
   10-nov-2026, come lo stato nelle tabelle). */
body.jo-form-v2 .jo-sec-status {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    color: var(--ds-text-secondary);
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    vertical-align: middle;
    white-space: nowrap;
}

body.jo-form-v2 .jo-sec-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ds-off-dot);
}

body.jo-form-v2 .jo-sec-status[data-status="todo"]::before { background: var(--ds-warn-dot); }
body.jo-form-v2 .jo-sec-status[data-status="done"]::before { background: var(--ds-ok-dot); }
body.jo-form-v2 .jo-sec-status[data-status="error"] { color: var(--ds-err-fg); }
body.jo-form-v2 .jo-sec-status[data-status="error"]::before { background: var(--ds-err-dot); }

/* Campi: rosso se sbagliato, verde se compilato bene (dopo averlo lasciato). */
html body.jo-form-v2 .fi-fo-field-wrp[data-jo-field="error"] .fi-input-wrp {
    --tw-ring-color: var(--ds-err-dot) !important;
    border-color: var(--ds-err-dot) !important;
    box-shadow: 0 0 0 3px rgba(217, 107, 107, .15) !important;
}

html body.jo-form-v2 .fi-fo-field-wrp[data-jo-field="ok"] .fi-input-wrp {
    --tw-ring-color: var(--ds-ok-bd) !important;
    border-color: var(--ds-ok-bd) !important;
}

html body.jo-form-v2 .fi-fo-field-wrp[data-jo-field="error"] .fi-fo-field-wrp-label span { color: var(--ds-err-fg); }

/* Gli obbligatori si riconoscono subito: asterisco più visibile. */
html body.jo-form-v2 .fi-fo-field-wrp-label sup { font-size: 13px; top: -.15em; }

html body.jo-form-v2 .fi-section-header-heading:has(.jo-sec-status) { display: flex; align-items: center; }

/* ══ Sezioni a tab dentro passi e accordion (owner 2-ott-2026, tutta la
   piattaforma, public/js/form-wheel.js; ha sostituito il carosello delle
   modifiche animate). Il più semplice possibile: tab di solo testo
   sottolineate, sotto i campi della sezione scelta senza un altro riquadro
   né la sua testata (la tab dice già il titolo); il pallino compare solo
   dove mancano obbligatori o c'è da correggere. ══ */
.jo-wheel-nav.jo-wheel-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 22px;
    margin: 0 0 14px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--ds-row-divider);
}
.jo-wheel-nav.jo-wheel-tabs::-webkit-scrollbar { display: none; }

.jo-wheel-nav.jo-wheel-tabs button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    margin-bottom: -1px;
    padding: 8px 0 9px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color .15s ease, border-color .15s ease;
}
.jo-wheel-nav.jo-wheel-tabs button:hover { color: var(--ds-text-primary); }
.jo-wheel-nav.jo-wheel-tabs button:focus-visible { outline: 0; box-shadow: var(--ds-focus-ring); }
.jo-wheel-nav.jo-wheel-tabs button[aria-current="true"] {
    border-bottom-color: var(--ds-accent);
    color: var(--ds-accent-fg);
}
.jo-wheel-nav.jo-wheel-tabs button i { display: none; width: 6px; height: 6px; border-radius: 50%; }
.jo-wheel-nav.jo-wheel-tabs button[data-status="todo"] i { display: block; background: var(--ds-warn-dot); }
.jo-wheel-nav.jo-wheel-tabs button[data-status="error"] i { display: block; background: var(--ds-err-dot); }

/* Una sezione alla volta; i gruppi fra contenitore e sezioni non fanno da riquadro. */
.fi-fo-component-ctn.jo-wheel--tabs { display: block !important; }
.jo-wheel--tabs .jo-wheel-wrap { display: contents !important; }
.jo-wheel--tabs [data-jo-wheel="1"] { display: none !important; }

/* Niente card nella card: i campi stanno direttamente sotto le tab, la
   sezione è sempre aperta (anche se era un accordion chiuso). */
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    /* Le tendine aperte escono dal riquadro, non vengono tagliate. */
    overflow: visible !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs)::before { display: none !important; }
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header { display: none !important; }
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-content-ctn {
    position: static !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-content-ctn > .fi-section-content {
    padding: 0 !important;
    background: transparent !important;
}

/* Parti di un accordion (segnalazione 3-nov-2026: niente tab dentro gli
   accordion). Tutte le sezioni in vista, una sotto l'altra: il titolo
   discreto come le parti .jo-fpart, dalla seconda una linea tratteggiata
   sopra. Il titolo non chiude la parte (form-wheel.js le tiene aperte). */
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header {
    display: flex !important;
    padding: 0 0 8px !important;
    border: 0 !important;
    background: transparent !important;
    cursor: default !important;
    pointer-events: none;
}
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header a,
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header button {
    pointer-events: auto;
}
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
    font-weight: 600 !important;
    color: var(--ds-text-primary) !important;
}
/* Nelle schede con la barra delle sezioni (Scheda hotel, gruppo, struttura,
   impostazioni) le parti sono il titolo principale dentro l'area: 16px,
   grassetto, ben distinte dalle etichette dei campi (12,5px); 12px fra il
   titolo e i campi (owner 10-nov-2026). */
html body .jo-sec-page .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h3) !important;
    font-weight: 700 !important;
}
html body .jo-sec-page .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header {
    padding-bottom: 12px !important;
}
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header > button:last-child,
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section[data-jo-wheel]:not(#jo-tabs) > .fi-section-header > .fi-icon-btn:last-child {
    display: none !important;
}
html body .jo-wheel--parts .fi-section.fi-section.fi-section.fi-section.jo-wheel-next[data-jo-wheel]:not(#jo-tabs) {
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--ds-border) !important;
}

/* Fuori da un passo (es. Scheda hotel, tab di una pagina) le parti stanno
   in una card sola. */
html body .fi-fo-tabs-tab.fi-active.fi-active:has(> .jo-wheel--parts) {
    padding: 16px !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 12px !important;
    background: var(--ds-surface) !important;
}

/* ══ Card-passo più morbide (owner 2-ott-2026: "non mi piacciono i numeri
   cerchiati e connessi"): niente linea fra i passi né cerchi outline. Il
   numero sta in una piccola tessera piena e tenue che prende il colore
   dello stato — neutra da compilare, lilla in compilazione, verde con la
   spunta a passo completato. Le card restano separate da un po' d'aria. ══ */
html .fi-section.jo-fstep:not(.jo-ftl)::after { display: none !important; }

html .fi-section.jo-fstep:not(.jo-fstep-plain, .jo-ftl) > .fi-section-header::before {
    left: 14px;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    border: 0;
    border-radius: 8px;
    background: var(--ds-surface-sunken, #F3F4F8);
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: none;
    transition: background-color .15s ease, color .15s ease;
}
html .fi-section.jo-fstep[data-jo-state="current"]:not(.jo-fstep-plain, .jo-ftl) > .fi-section-header::before {
    background: var(--ds-accent-soft, #F3EEFC);
    color: var(--ds-accent-fg, #5F45A8);
}
html .fi-section.jo-fstep[data-jo-state="done"]:not(.jo-fstep-plain, .jo-ftl) > .fi-section-header::before {
    content: '✓';
    background: var(--ds-step-done-bd, #D3EBDD);
    color: var(--ds-step-done-fg, #2E7A50);
    font-size: 13px;
}
.fi-form > .fi-fo-component-ctn:has(.fi-section.jo-fstep),
:is(.fi-form, form) .fi-fo-component-ctn:has(> * .fi-section.jo-fstep) { row-gap: 10px !important; }

/* Card-passo aperta arrotondata a tutti gli angoli (owner 2-ott-2026): il
   fondo del contenuto e della testata segue il raggio della card, invece di
   uscire squadrato sotto. */
html body .fi-section.fi-section.jo-fstep:not(.fi-collapsed) > .fi-section-header { border-radius: 9px 9px 0 0 !important; }
html body .fi-section.fi-section.jo-fstep:not(.fi-collapsed) > .fi-section-content-ctn,
html body .fi-section.fi-section.jo-fstep:not(.fi-collapsed) > .fi-section-content-ctn > .fi-section-content { border-radius: 0 0 9px 9px !important; }
html body .fi-section.fi-section.jo-fstep.fi-collapsed > .fi-section-header { border-radius: 9px !important; }

/* Col fuoco in una sezione a tab di una pagina a tab il velo scatta: la
   card con le tab resta in chiaro tutta intera, non solo la sezione. */
body.jo-focus-wheel .fi-fo-tabs-tab.fi-active:has(> .jo-wheel--parts) {
    position: relative;
    z-index: 10;
}

/* Wizard (es. "Crea con AI") come le card-passo (owner 2-ott-2026): niente
   linea fra i passi né cerchi, il numero in una tessera piena e tenue —
   neutra, lilla per il passo attivo, verde con la spunta per quelli fatti. */
.fi-fo-wizard > .fi-fo-wizard-header > li:not(:last-child)::after { display: none !important; }
.fi-fo-wizard .fi-fo-wizard-header-step .fi-fo-wizard-header-step-icon-ctn {
    border: 0 !important;
    border-radius: 8px !important;
    background: var(--ds-surface-sunken, #F3F4F8) !important;
}
.fi-fo-wizard .fi-fo-wizard-header-step .fi-fo-wizard-header-step-indicator { color: var(--ds-text-tertiary, #5B5B6B) !important; font-weight: 600; }
.fi-fo-wizard .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-icon-ctn { background: var(--ds-accent-soft, #F3EEFC) !important; }
.fi-fo-wizard .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-indicator { color: var(--ds-accent-fg, #5F45A8) !important; }
.fi-fo-wizard .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon-ctn { background: var(--ds-step-done-bd, #D3EBDD) !important; }
.fi-fo-wizard .fi-fo-wizard-header-step.fi-completed .fi-fo-wizard-header-step-icon { color: var(--ds-step-done-fg, #2E7A50) !important; }
.fi-fo-wizard .fi-fo-wizard-header-step-button { border-radius: 8px; }
.fi-fo-wizard > .fi-fo-wizard-header { padding: 6px !important; gap: 2px; }

/* Ogni accordion arrotondato a tutti gli angoli, aperto o chiuso (owner
   2-ott-2026): testata e contenuto seguono il raggio del contenitore. */
html body .fi-section.fi-section[x-on\:collapse-section\.window]:not(.jo-fstep, [data-jo-wheel], .fi-collapsed) > .fi-section-content-ctn,
html body .fi-section.fi-section[x-on\:collapse-section\.window]:not(.jo-fstep, [data-jo-wheel], .fi-collapsed) > .fi-section-content-ctn > .fi-section-content { border-radius: 0 0 9px 9px !important; }
html body .fi-section.fi-section[x-on\:collapse-section\.window]:not(.jo-fstep, [data-jo-wheel], .fi-collapsed) > .fi-section-header { border-radius: 9px 9px 0 0 !important; }
html body .fi-section.fi-section[x-on\:collapse-section\.window].fi-collapsed:not(.jo-fstep, [data-jo-wheel]) > .fi-section-header { border-radius: 9px !important; }

/* Nelle sezioni a tab i titoli intermedi dei blocchi (blockHeading) sono un
   doppione delle tab: nascosti. */
.jo-wheel--tabs .fi-fo-field-wrp:has(.jo-block-heading),
.jo-wheel--tabs .jo-block-heading { display: none !important; }
.jo-wheel-nav.jo-wheel-tabs.is-overflow { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }

/* Card-passo iniziata ma con campi vuoti (owner 2-ott-2026: verde solo con
   tutti i campi compilati): badge e tessera ambra tenue con quanti mancano. */
.jo-fstep-badge[data-state="partial"] {
    border-color: var(--ds-warn-bd, #F9D9A6);
    background: var(--ds-warn-bg, #FEF3E2);
    color: var(--ds-warn-fg, #8A4B00);
}
.jo-fstep-badge[data-state="partial"]::before { background: var(--ds-warn-dot, #D9A048); opacity: 1; }
/* «2 su 13» (owner 11-nov-2026): senza obbligatori mancanti, niente ambra, un
   anello che si riempie dei campi compilati (form-steps.js, data-ring). */
.jo-fstep-badge[data-state="partial"][data-ring] { border-color: transparent; background: transparent; color: var(--ds-text-tertiary, #5B5B6B); font-variant-numeric: tabular-nums; }
.jo-fstep-badge[data-state="partial"][data-ring]::before {
    width: 12px;
    height: 12px;
    background: conic-gradient(var(--ds-accent) var(--jo-ring, 0%), var(--ds-border-strong) 0);
    -webkit-mask: radial-gradient(circle at center, transparent 3.5px, #000 4px);
    mask: radial-gradient(circle at center, transparent 3.5px, #000 4px);
}
html .fi-section.jo-fstep[data-jo-state="partial"]:not(.jo-fstep-plain, .jo-ftl) > .fi-section-header::before {
    background: var(--ds-warn-bg, #FEF3E2);
    color: var(--ds-warn-fg, #8A4B00);
}

/* Una tabella dentro una sezione a tab: il titolo lo dice già la tab. */
.jo-wheel--tabs .fi-ta-header-heading,
.jo-wheel--tabs .fi-ta-header:not(:has(.fi-ta-actions > *)):has(.fi-ta-header-heading) { display: none !important; }

/* ── Annulla e Salva solo dopo una modifica (owner 2-ott-2026) ──
   Finché non si cambia niente il piede del form non c'è (si esce con
   "Indietro"); compare alla prima modifica (public/js/form-dirty.js).
   Solo nei form che modificano: in creazione (Registra hotel, Nuovo …)
   Annulla e la CTA ci sono sempre (owner 5-ott-2026). */
body:not(.jo-form-dirty) .fi-main:has(form[wire\:submit^="save"]) .fi-form-actions,
body:not(.jo-form-dirty) .fi-main [data-jo-dirty-scope] .fi-form-actions {
    display: none;
}

/* Preventivo (owner 5-ott-2026): in bozza il piede resta con Scarica PDF e
   Invia al cliente; Salva bozza e Annulla compaiono solo dopo una modifica.
   Un preventivo già partito segue la regola delle pagine di modifica: il
   piede solo dopo una modifica (revisione 19-ott-2026; Scarica PDF resta
   nei tre puntini della testata, l'invio nell'anteprima). */
body.jo-quote-pilot.jo-quote-draft:not(.jo-form-dirty) .fi-main .fi-form-actions:has(.jo-fa-dirty) {
    display: block;
}

/* Anche un Salva fuori dal piede (Impara dal sito, Piano email): stesso
   stato di form-dirty.js, che resta acceso se il salvataggio torna con
   errori (revisione PR #588). */
body:not(.jo-form-dirty) .jo-fa-dirty {
    display: none !important;
}

/* ══ Passi dei form di creazione con lo stesso disegno degli accordion
   (owner 5-ott-2026: "omologare tutti gli accordion all'ultima versione,
   compresi quelli di creazione, che mantengono i numeri"). Vera card come
   le .jo-fstep-plain — bordo, ombra di riposo, radius 12, testata alta
   ~60px, titolo 16/600 (--ds-fs-h3), descrizione su una riga, freccia 18px; chiusa si
   solleva al passaggio, aperta = bordo lilla, testata lilla e filetto —;
   al posto dell'icona c'è il numero, nella stessa tessera da 32px che
   prende il colore dello stato (neutra, lilla, ambra, verde con la ✓). ══ */
html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) {
    border-radius: 12px !important;
    border: 1px solid var(--ds-border) !important;
    background: var(--ds-surface) !important;
    box-shadow: var(--ds-shadow-rest) !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep).fi-collapsed:hover {
    border-color: var(--ds-border-strong) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep):not(.fi-collapsed) {
    border-color: var(--ds-step-current-bd) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header {
    min-height: 60px;
    justify-content: center;
    padding: 12px 16px 12px 62px !important;
    background: transparent !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep):not(.fi-collapsed) > .fi-section-header {
    border-radius: 11px 11px 0 0 !important;
    background: var(--ds-section-open-head) !important;
    border-bottom: 1px solid var(--ds-border) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep).fi-collapsed > .fi-section-header { border-radius: 11px !important; }
html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep):not(.fi-collapsed) > .fi-section-content-ctn,
html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep):not(.fi-collapsed) > .fi-section-content-ctn > .fi-section-content { border-radius: 0 0 11px 11px !important; }

/* Il numero nella tessera da 32px, come l'icona degli altri accordion. */
html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header::before {
    left: 16px;
    top: 50%;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    border-radius: 8px;
    font-size: 12px;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h3) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--ds-text-primary);
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header .fi-section-header-description,
html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header .jo-fstep-summary {
    margin-top: 2px;
    overflow: hidden;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
    color: var(--ds-text-tertiary) !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header :is(.fi-icon-btn, button[x-on\:click]) svg {
    width: 18px;
    height: 18px;
    color: var(--ds-text-tertiary);
}

@media (max-width: 640px) {
    html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header { padding-left: 56px !important; }
    html body .fi-section.fi-section.fi-section.fi-section.jo-fstep.jo-fstep:not(.jo-fstep-plain, .jo-ftl):not(.jo-fstep .jo-fstep) > .fi-section-header::before { left: 12px; }
}

/* ══ Accordion tutti uguali, senza icone (owner 5-ott-2026: "alcuni hanno
   le icone e altri no, toglile e rendili uniformi"). Ogni sezione che si
   apre e si chiude — card delle schede e delle impostazioni, sezioni dentro
   le card, sezioni a sé, dettagli in sola lettura — mostra solo titolo,
   descrizione e freccia; i passi di creazione solo il numero, quelli sulla
   linea (.jo-ftl) numero e icona, uguali per tutti (owner 4-nov-2026). ══ */
html body .fi-section:is(.jo-fstep, [x-on\:collapse-section\.window], :has(> header[x-on\:click])):not(.jo-ftl) > .fi-section-header .fi-section-header-icon {
    display: none !important;
}

/* Sotto-blocchi di una sezione mostrata come tab (owner 7-ott-2026): niente
   riquadro dentro la tab, solo titolo con filetto; il blocco che ripete il
   titolo della tab perde la testata (form-wheel.js: .jo-wheel-sub). */
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-sub:not(#jo-sub) {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-sub:not(#jo-sub) > .fi-section-header {
    padding: 4px 0 6px !important;
    background: transparent !important;
    border-bottom: 1px solid var(--ds-border-subtle, var(--ds-border)) !important;
    border-radius: 0 !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-sub:not(#jo-sub) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-sub:not(#jo-sub) > .fi-section-content-ctn,
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-sub:not(#jo-sub) > .fi-section-content-ctn > .fi-section-content {
    padding: 12px 0 0 !important;
    border: 0 !important;
    background: transparent !important;
}
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-samehead:not(#jo-sub) > .fi-section-header { display: none !important; }
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-samehead:not(#jo-sub) > .fi-section-content-ctn,
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-wheel-samehead:not(#jo-sub) > .fi-section-content-ctn > .fi-section-content { padding-top: 0 !important; }

/* Parti con un titolo solo (Scheda hotel ▸ Struttura, owner 10-nov-2026:
   «troppi titoli», HotelResource::SHEET_ONE_TITLE): i blocchi dentro non
   mostrano la testata. */
html body .fi-section.fi-section.fi-section.jo-sub-untitled:not(#jo-sub) > .fi-section-header { display: none !important; }
/* Senza testata non serve il rientro del sotto-blocco (owner 10-nov-2026: «tutta
   questa distanza fra il titolo e il resto»): i campi stanno subito sotto il titolo
   della parte. */
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-sub-untitled.jo-sub-untitled:not(#jo-sub) > .fi-section-content-ctn,
html body .jo-wheel--tabs .fi-section.fi-section.fi-section.jo-wheel-sub.jo-sub-untitled.jo-sub-untitled:not(#jo-sub) > .fi-section-content-ctn > .fi-section-content { padding-top: 0 !important; }
html body .fi-fo-component-ctn > div:has(> .fi-section.jo-sub-untitled) ~ div:has(> .fi-section.jo-sub-untitled) { margin-top: 0; }
/* La distanza fra i gruppi è quella fra le righe della parte (24px), non un
   margine: due blocchi a metà sulla stessa riga restano allineati. */
html body .fi-section.jo-fcard .fi-section:not(.jo-fcard) > .fi-section-content-ctn > .fi-section-content > .fi-fo-component-ctn:has(> div > .fi-section.jo-sub-untitled) { row-gap: 24px; }

/* Riga "Imposta con AI" sotto il titolo di una sezione (owner 7-ott-2026):
   un'opzione leggera, non un riquadro; un filetto lilla a sinistra la lega
   al pulsante che l'ha aperta. */
.jo-ai-row {
    margin-bottom: 4px;
    padding: 2px 0 10px 12px;
    border-left: 2px solid var(--ds-accent-soft-2, var(--ds-accent-soft));
}
/* La barra delle tab dentro il contenitore (dopo una riga .jo-wheel-lead) prende tutta la riga. */
.jo-wheel-nav.is-inside { grid-column: 1 / -1; }

/* ── Scheda hotel ▸ Camere a tessere e Libreria immagini a miniature (owner
 * 8-ott-2026): niente tabelle. livewire/hotel-rooms-inline.blade.php,
 * sheet-media.blade.php. */
.jo-hrooms-note { margin: 0 0 6px; font-size: 12.5px; color: var(--ds-text-tertiary, #5B5B6B); }
/* L'icona di Sincronizza dentro la frase «Non ancora aggiornate» (11-nov-2026). */
.jo-hrooms-note-icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.jo-hrooms-photo {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 32px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--ds-surface-sunken, #EDEFF3);
    color: var(--ds-text-tertiary, #5B5B6B);
}
.jo-hrooms-photo img { width: 100%; height: 100%; object-fit: cover; }
.jo-hrooms-photo svg { width: 16px; height: 16px; }
.jo-hrooms-unit { font-size: 11.5px; font-weight: 400; color: var(--ds-text-tertiary, #5B5B6B); }
/* «Sincronizza le camere» sulla riga della nota, a destra (owner 10-nov-2026:
   sempre in vista, le camere arrivano solo dal motore). Senza motore è grigia,
   col motivo nel tooltip (HotelResource::roomsTab). */
.fi-fo-component-ctn:has(> div > .jo-hrooms-sync) { position: relative; }
.fi-fo-component-ctn > div:has(> .jo-hrooms-sync) { position: absolute; top: -9px; right: 0; z-index: 1; }
.fi-fo-component-ctn:has(> div > .jo-hrooms-sync) .jo-hrooms-note { padding-right: 44px; }
/* Una camera = una riga anche sul telefono (foto · nome · prezzo · freccia):
   la regola delle righe dei preventivi (guest-profile.css) le mandava a capo. */
.jo-hrooms .jo-cq-link { flex-wrap: nowrap; }
.jo-hrooms .jo-cq-link .jo-ls-main { flex: 1 1 auto; flex-basis: auto; min-width: 0; }
/* La camera si apre nella sua pagina (owner 3-nov-2026, scheda a tessere): stile in hotel-workspace.css (.jo-room-*).
   La riga che si apre lì sotto resta per i numeri del Centralino (VoicePhoneNumbersInline):
   in rilievo, con i campi sotto e Annulla · Salva in fondo. */
.jo-hroom-row { flex-wrap: wrap; }
.jo-hroom-row .jo-cq-go svg { transition: transform .15s ease; }
.jo-hroom-row.is-open .jo-cq-go svg { transform: rotate(180deg); }
.jo-hroom-row.is-open { margin: 6px -8px; padding: 0 8px 12px; border: 1px solid var(--ds-accent-soft-2, #EAE1FA); border-radius: 12px; background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-focus-raise); }
.jo-hroom-row.is-open + .jo-hroom-row { border-top: 0; }
.jo-hroom-newhead { flex-basis: 100%; padding: 12px 0 2px; font-size: 13.5px; }
.jo-hroom-edit { flex-basis: 100%; min-width: 0; }
.jo-hroom-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.jo-hmedia { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.jo-hmedia-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.jo-hmedia-thumb {
    display: grid;
    place-items: center;
    width: 64px;
    height: 48px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--ds-surface-sunken, #EDEFF3);
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-secondary, #3F3F46);
}
.jo-hmedia-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jo-hmedia-open { font-size: 13px; }

/* Accordion delle pagine di dettaglio (infolist, .jo-in-section da
   FormCards::configureInfolist): l'icona della sezione, se ne ha una, resta
   in una tessera lilla tenue come nel dettaglio del Preventivatore. Prevale
   sulla regola che nasconde le icone degli accordion dei form. */
html body .fi-section.jo-in-section.jo-in-section > .fi-section-header .fi-section-header-icon {
    display: block !important;
    box-sizing: content-box;
    flex-shrink: 0;
    align-self: center;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    padding: 7px;
    border-radius: 8px;
    background: var(--ds-accent-soft, #F3EEFC);
    color: var(--ds-accent, #7C5CCB) !important;
}

/* ── Barra delle sezioni in testa alla pagina (owner 9-ott-2026) ──
   Una pagina HasSectionBar con 2+ sezioni di primo livello mostra UNA
   sezione alla volta (Elia 9-nov-2026, NavigatesSections): il server disegna
   solo quella aperta, con sopra la barra ferma sotto la topbar, una voce per
   sezione con la sua icona. Le altre sezioni sono un segnaposto
   (.jo-sec-parked) e la loro cella della griglia sparisce. Disegno della
   barra (viola, voce accesa con la riga lime) in design-system.css. */
.jo-sec-tabs {
    position: sticky;
    top: var(--jo-topbar-h, 64px);
    z-index: 11; /* sopra il velo della sezione aperta */
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 4px;
    padding: 0 4px;
    background: var(--ds-bg-app, #EDEFF4);
    border-bottom: 1px solid var(--ds-border, #DFE2EA);
}

.jo-sec-tabs::-webkit-scrollbar {
    display: none;
}

.jo-sec-tabs > button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 12px 10px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ds-text-tertiary, #5B5B6B);
    white-space: nowrap;
    background: none;
    cursor: pointer;
}

/* L'icona della sezione nella sua voce (Elia 9-nov-2026: «schede più distinte con titolo e icona»). */
.jo-sec-tabs .jo-sec-ic {
    width: 16px;
    height: 16px;
    flex: none;
}

.jo-sec-tabs > button:hover {
    color: var(--ds-text-primary, #18181B);
}

.jo-sec-tabs > button.is-active {
    color: var(--ds-accent, #7C5CCB);
    border-bottom-color: var(--ds-accent, #7C5CCB);
    font-weight: 600;
}

.jo-sec-tabs > button:focus-visible {
    outline: 2px solid var(--ds-focus-ring, #7C5CCB);
    outline-offset: -2px;
    border-radius: 6px;
}

/* Le sezioni non aperte: un segnaposto vuoto, e la sua cella della griglia
   di Filament (un div) non occupa spazio (altrimenti restavano i 24px di
   gap). Soggetto col tag e :has(> …) sul figlio: Chrome non lo prova su
   ogni elemento (PanelCssSelectorsTest). */
.fi-fo-component-ctn > div:has(> .jo-sec-parked) {
    display: none !important;
}

/* La sezione aperta (Elia 9-nov-2026: «testate ben distinte, anche con colori
   diversi»): il colore della sua area (data-jo-tone da ConceptIcons::TONES,
   neutro = viola JOORNA) sul filetto a sinistra, sulla testata appena tinta e
   sulla tessera dell'icona, che qui torna visibile (altrove gli accordion
   sono senza icona, owner 5-ott-2026). Specificità alta: batte le regole
   degli accordion e la regola che nasconde l'icona. */
.jo-sec-current { --jo-sec-tone: var(--ds-accent); }
.jo-sec-current[data-jo-tone="people"] { --jo-sec-tone: var(--ds-tone-people-solid); }
.jo-sec-current[data-jo-tone="stay"] { --jo-sec-tone: var(--ds-tone-stay-solid); }
.jo-sec-current[data-jo-tone="email"] { --jo-sec-tone: var(--ds-tone-email-solid); }
.jo-sec-current[data-jo-tone="whatsapp"] { --jo-sec-tone: var(--ds-tone-whatsapp-solid); }
.jo-sec-current[data-jo-tone="ai"] { --jo-sec-tone: var(--ds-tone-ai-solid); }
.jo-sec-current[data-jo-tone="money"] { --jo-sec-tone: var(--ds-tone-money-solid); }
.jo-sec-current[data-jo-tone="todo"] { --jo-sec-tone: var(--ds-tone-todo-solid); }
.jo-sec-current[data-jo-tone="danger"] { --jo-sec-tone: var(--ds-tone-danger-solid); }

html body .fi-page.jo-sec-page .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-sec-current {
    position: relative;
    z-index: auto;
    border-color: color-mix(in srgb, var(--jo-sec-tone) 45%, var(--ds-border)) !important;
    box-shadow: var(--ds-shadow-rest) !important;
}

html body .fi-page.jo-sec-page .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-sec-current::before {
    content: '';
    position: absolute;
    z-index: 3;
    top: 10px;
    bottom: 10px;
    left: -1px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--jo-sec-tone);
    pointer-events: none;
}

html body .fi-page.jo-sec-page .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-sec-current > .fi-section-header {
    background: color-mix(in srgb, var(--jo-sec-tone) 7%, var(--ds-surface)) !important;
}

html body .fi-page.jo-sec-page .fi-section.fi-section.fi-section.fi-section.jo-fcard.jo-sec-current > .fi-section-header .fi-section-header-icon {
    display: block !important;
    box-sizing: content-box;
    flex-shrink: 0;
    align-self: center;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    padding: 7px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--jo-sec-tone) 14%, var(--ds-surface));
    color: var(--jo-sec-tone) !important;
}

/* Il piede nelle pagine con la barra: Indietro e Avanti (.jo-sec-nav) sempre
   in vista, ai due lati; Salva e Annulla (.jo-fa-dirty) solo dopo una
   modifica. Resta sopra le parti in rilievo dentro le sezioni, come quando
   c'è il velo (body.jo-focus-open .fi-form-actions). */
body:not(.jo-form-dirty) .fi-main .fi-page.jo-sec-page .fi-form-actions:has(.jo-sec-nav) {
    display: block;
}

/* Indietro a sinistra, Avanti a destra, Annulla e Salva accanto ad Avanti.
   Nelle pagine di modifica le azioni sono in fila al contrario (row-reverse,
   «Azioni del form» qui sopra): qui l'ordine è quello scritto, sempre. */
html body .fi-page.jo-sec-page .fi-form-actions .fi-ac {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end !important;
}

html body .fi-page.jo-sec-page .fi-form-actions .fi-ac > * {
    margin: 0 !important;
}

/* Indietro prende lo spazio libero: resta a sinistra, il resto a destra
   (anche quando Annulla e Salva sono nascosti). */
html body .fi-page.jo-sec-page .fi-form-actions .fi-ac > .jo-sec-prev {
    margin-inline-end: auto !important;
}

.fi-page.jo-sec-page .fi-form-actions {
    z-index: 11;
}

/* In fondo alla pagina, non più fermo: al suo posto, 20px sotto l'ultima
   card. Il «bottom» del piede fermo (hotel-workspace.css) lo tirava su di
   16px e i tasti restavano a 4px dalla card (owner 17-nov-2026, «devono
   respirare»). */
.fi-page.jo-sec-page .fi-form-actions:not(.fi-sticky) {
    position: relative;
    bottom: auto;
}

/* Barra delle sezioni sul telefono: le voci che non ci stanno sfumano a
   destra finché la barra non è scorsa fino in fondo (is-overflow) e a
   sinistra appena è scorsa (is-scrolled: la voce aperta in mezzo lascia
   tagliata la prima). Le classi le mette la barra stessa
   (section-bar.blade.php), come le tab dentro le card (.jo-wheel-tabs). */
.jo-sec-tabs.is-overflow {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}

.jo-sec-tabs.is-scrolled {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 40px);
    mask-image: linear-gradient(to right, transparent, #000 40px);
}

.jo-sec-tabs.is-scrolled.is-overflow {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

/* Ripetitore "piatto" (.jo-flat-repeater, es. le email di un'automazione):
 * i campi stanno nel passo come campi normali, senza un riquadro da aprire
 * dentro l'accordion (owner 19-ott-2026). Con più voci, ognuna ha sopra il
 * suo nome ("Email 2 · …") e un filetto; con una sola niente testata. */
html .jo-flat-repeater .fi-fo-repeater-item {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}
html .jo-flat-repeater .fi-fo-repeater-item > .fi-fo-repeater-item-header {
    padding: 0 0 6px !important;
    border: 0 !important;
    background: transparent !important;
}
html .jo-flat-repeater .fi-fo-repeater-item > .fi-fo-repeater-item-header h4 {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ds-text-tertiary, #5B5B6B);
}
html .jo-flat-repeater .fi-fo-repeater-item > .fi-fo-repeater-item-content {
    padding: 0 !important;
    border: 0 !important;
}
html .jo-flat-repeater .fi-fo-repeater-item + .fi-fo-repeater-item {
    border-top: 1px solid var(--ds-border, #DFE2EA) !important;
    padding-top: 12px;
}
html .jo-flat-repeater .fi-fo-repeater-item:only-child > .fi-fo-repeater-item-header {
    display: none;
}
/* Traduzioni di versioni e camere a righe (VoucherProductResource::translatedNames):
 * il nome italiano sopra, sotto nome e descrizione tradotti, con aria fra il titolo
 * del gruppo, le righe e i due campi (Gabriele 19-nov-2026: «troppo attaccati»). */
html .jo-tr-names {
    margin-top: 8px;
}
html .jo-tr-names .fi-fo-repeater-item-content > .fi-fo-component-ctn {
    gap: 8px !important;
}
html .jo-tr-names .fi-fo-repeater-item + .fi-fo-repeater-item {
    margin-top: 6px;
    padding-top: 14px;
}
html .jo-tr-names .jo-tr-names-source {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ds-text-primary);
}

/* Scelta a pulsanti affiancati (ToggleButtons grouped) in una card stretta o
 * sul telefono: resta nella card e scorre di lato, non esce dal bordo
 * (es. "Nella pagina | Popup | Bottone flottante" dei form di contatto). */
html .fi-fo-field-wrp .fi-btn-group.w-max {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
html .fi-fo-field-wrp .fi-btn-group.w-max > * {
    flex: none;
}

/* === Sezioni vuote, in tutta la piattaforma (owner 20-ott-2026) ===
   Un accordion senza niente dentro (sezione di Filament: card, passo,
   dettaglio; <details class="jo-acc"> scritto a mano) resta al suo posto
   come una riga tratteggiata e trasparente, col titolo e "Nessun …"
   attenuati, senza freccia: non si apre (classe .is-empty). Dove c'è già
   un'azione per aggiungere, il "+" (.jo-empty-add) prende il posto della
   freccia (.is-addable). Classi da App\Filament\Support\EmptySection, nei
   Blade a mano + <x-jo.empty-add>. Le sezioni mostrate come tab
   (form-wheel.js, [data-jo-wheel]) restano normali: si attenua la tab.
   Selettori lunghi per battere la specificità delle card .jo-fstep-plain. */
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]),
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty {
    border: 1px dashed var(--ds-border-strong, #C9CDD8) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]):hover,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty:hover {
    border-color: var(--ds-border-strong, #C9CDD8) !important;
    box-shadow: none !important;
    transform: none !important;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary {
    background: transparent !important;
    border-bottom: 0 !important;
    cursor: default !important;
    pointer-events: none !important;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-section-header-heading,
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-section-header-description,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary .jo-acc-title,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary .jo-acc-title small {
    color: var(--ds-text-tertiary, #6B6B7B) !important;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-section-header-heading,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary .jo-acc-title {
    font-weight: 500 !important;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-section-header-icon {
    opacity: .6;
}

/* Niente freccia e niente contenuto: non c'è niente da aprire. */
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-section-collapse-button,
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .fi-icon-btn:not(.jo-empty-add),
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header::after,
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]):not(.is-addable) > .fi-section-content-ctn,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary::after,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty:not(.is-addable) > :not(summary) {
    display: none !important;
}

/* Le voci vuote delle tab dentro un accordion (form-wheel.js copia
   .is-empty dalla sezione alla tab). */
.jo-wheel-tabs button.is-empty:not([aria-selected="true"]) {
    color: var(--ds-text-tertiary, #8A8A99);
    font-weight: 400;
}

/* Sezione vuota dove si può aggiungere: il "+" al posto della freccia
   (Crea preventivo, Nuova richiesta, Aggiungi nota…); aperta, la sezione
   torna una card normale. */
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty:not([data-jo-wheel]) > .fi-section-header .jo-empty-add,
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty > summary .jo-empty-add {
    pointer-events: auto;
}

/* Il "+" è una tessera lilla piena, come Assistenza nel menu: tratteggiato
   e vuoto come la riga che lo ospita sembrava spento (Elia 28-ott-2026). */
.jo-empty-add,
.fi-icon-btn.jo-empty-add {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    border: 1px solid var(--ds-accent-soft-2, #E5DAFB);
    border-radius: 8px;
    color: var(--ds-accent-fg, #5E00D6);
    background: var(--ds-accent-soft, #F4ECFF);
    box-shadow: var(--ds-shadow-rest);
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}

.jo-empty-add svg,
.fi-icon-btn.jo-empty-add .fi-icon-btn-icon {
    width: 16px;
    height: 16px;
    color: inherit;
    stroke-width: 2;
}

.jo-empty-add:hover,
.jo-empty-add:focus-visible,
.fi-icon-btn.jo-empty-add:hover,
.fi-icon-btn.jo-empty-add:focus-visible {
    background: var(--ds-accent, #7145D9);
    border-color: var(--ds-accent, #7145D9);
    color: #fff;
}

html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.is-empty.is-empty.is-addable:not([data-jo-wheel]):not(.fi-collapsed),
html body details.jo-acc.jo-acc.jo-acc.is-empty.is-empty.is-addable[open] {
    border-style: solid !important;
    border-color: var(--ds-accent-soft-2, #E5DAFB) !important;
    background: var(--ds-surface, #FCFCFD) !important;
}

/* Elenco chiave → valore a righe (.jo-kv-rows, es. il mapping dei campi di un
 * PMS): una riga per voce con i due campi e il cestino a destra, le etichette
 * solo sulla prima riga, niente testata che ripete i valori (owner 21-ott-2026). */
html .jo-kv-rows .fi-fo-repeater-item {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
html .jo-kv-rows .fi-fo-repeater-item > .fi-fo-repeater-item-content {
    order: 1;
    flex: 1 1 auto;
    padding: 0 !important;
    border: 0 !important;
}
html .jo-kv-rows .fi-fo-repeater-item > .fi-fo-repeater-item-header {
    order: 2;
    padding: 0 0 2px !important;
    border: 0 !important;
    background: transparent !important;
}
html .jo-kv-rows .fi-fo-repeater-item > .fi-fo-repeater-item-header h4 {
    display: none;
}
html .jo-kv-rows .fi-fo-repeater-item + .fi-fo-repeater-item .fi-fo-field-wrp-label {
    display: none;
}
html .jo-kv-rows .fi-fo-repeater > ul,
html .jo-kv-rows ul {
    gap: 6px !important;
}

/* Comunicazioni alle strutture ▸ Chi riceve: dopo il nome, quanti moduli
   (l'elenco nel tooltip), tenue (owner 21-ott-2026). */
.jo-aud-mods {
    color: var(--ds-text-tertiary, #5B5B6B);
    font-size: 12.5px;
    white-space: nowrap;
    cursor: help;
}

/* Dentro un accordion le voci di un menu o di un filtro si scelgono in viola,
 * come le tab delle sezioni (owner 21-ott-2026: il verde del menu orizzontale
 * vale solo fuori dagli accordion; es. Scheda ospite ▸ Interazioni). */
html body .fi-section-content-ctn .jo-qf .fi-tabs-item:hover:not(.fi-active),
html body .fi-section-content-ctn .fi-page-sub-navigation-tabs .fi-tabs-item:hover:not(.fi-active),
html body details.jo-acc .jo-qf .fi-tabs-item:hover:not(.fi-active) {
    background: var(--ds-accent-soft, #F1EAFD) !important;
}
html body .fi-section-content-ctn .jo-qf .fi-tabs-item.fi-active::after,
html body .fi-section-content-ctn .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active::after,
html body details.jo-acc .jo-qf .fi-tabs-item.fi-active::after {
    background: var(--ds-accent, #7145D9) !important;
}
html body .fi-section-content-ctn .jo-qf .fi-tabs-item.fi-active .fi-tabs-item-label,
html body .fi-section-content-ctn .jo-qf .fi-tabs-item.fi-active .fi-tabs-item-icon,
html body .fi-section-content-ctn .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-tabs-item-label,
html body .fi-section-content-ctn .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-tabs-item-icon,
html body details.jo-acc .jo-qf .fi-tabs-item.fi-active .fi-tabs-item-label {
    color: var(--ds-accent-fg, #5B32C7) !important;
}
html body .fi-section-content-ctn .jo-qf .fi-tabs-item.fi-active .fi-badge,
html body .fi-section-content-ctn .fi-page-sub-navigation-tabs .fi-tabs-item.fi-active .fi-badge,
html body details.jo-acc .jo-qf .fi-tabs-item.fi-active .fi-badge {
    background: var(--ds-accent-soft, #F1EAFD) !important;
    color: var(--ds-accent-fg, #5B32C7) !important;
}
.dark .fi-section-content-ctn .jo-qf .fi-tabs-item:hover:not(.fi-active),
.dark details.jo-acc .jo-qf .fi-tabs-item:hover:not(.fi-active) {
    background: color-mix(in srgb, var(--ds-accent, #7145D9) 14%, transparent) !important;
}

/* Pop-up aperto da dentro un accordion, una scheda o un blocco Livewire
   (owner 21-ott-2026: la nota dell'ospite finiva sotto la scheda contatto,
   la topbar e la sidebar). Il riquadro aperto crea un contesto di
   sovrapposizione: finché il pop-up è aperto chi lo contiene sale sopra
   topbar, sidebar e riepiloghi fissi, così il velo copre tutto lo schermo. */
/* La classe la mette ui-standard.js agli antenati del pop-up aperto
   (evento modal-opened di Filament). Prima era CSS puro,
   body *:has(.fi-modal.fi-modal-open): Chrome lo provava su ogni elemento a
   ogni ricalcolo dello stile, su tutte le pagine (28-ott-2026). */
.jo-modal-host {
    z-index: 45 !important;
}

/* Testata di un passo su schermi stretti (owner 21-ott-2026): il blocco del
   titolo si stringe invece di spingere fuori la freccia, e lo stato lungo
   ("In compilazione · 12 obbligatori…") finisce coi puntini. */
.fi-section.jo-fstep > .fi-section-header .grid.flex-1 { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.fi-section.jo-fstep > .fi-section-header .fi-section-header-heading { min-width: 0; }
.fi-section.jo-fstep .jo-fstep-badge { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ── Piede delle azioni: solo i pulsanti, mai una barra (owner 22-ott-2026) ──
 * Prima a volte c'era una barra bianca (il piede fisso di Filament quando il
 * modulo è più lungo dello schermo, la Scheda hotel, il compositore sul
 * telefono) e a volte no. Ora ovunque, fermo in basso o no, si vedono solo
 * Annulla e la CTA: niente fondo, bordo, ombra né riquadro. Vince sulle
 * regole di Filament, hotel-workspace.css, std-quotes.css e mobile.css. */
html body .fi-form-actions,
html body .fi-form-actions.fi-sticky,
html body .fi-resource-edit-record-page.fi-resource-hotels .fi-form-actions,
html body .jo-qcomp-main .fi-form-actions {
    margin-inline: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Senza barra i pulsanti stanno sopra il contenuto che scorre: in scuro il
 * grigio di Filament (bg-white/5) è quasi trasparente e il testo sotto si
 * leggeva attraverso «Annulla». Fondo pieno, stesso tono (in chiaro è già
 * pieno). Non gli «outlined», che in Filament non hanno fondo. */
html.dark body .fi-form-actions .fi-btn.fi-color-gray:not(.fi-btn-outlined) {
    background-color: var(--ds-surface-2);
}

html.dark body .fi-form-actions .fi-btn.fi-color-gray:not(.fi-btn-outlined):hover {
    background-color: var(--ds-surface-hover);
}

/* Annulla, Indietro e Avanti con lo stesso contorno delle card (owner
 * 17-nov-2026, «il contorno non è uguale agli altri»): il filo di 1px nel
 * colore dei bordi, dentro il tasto come il bordo delle card, e la stessa
 * ombra leggera. L'anello di Filament stava 1px fuori e i tasti sbordavano
 * dalla card sopra. Il contorno di focus da tastiera resta quello di Filament. */
html body .fi-form-actions .fi-btn.fi-color-gray:not(.fi-btn-outlined):not(:focus-visible) {
    box-shadow: inset 0 0 0 1px var(--ds-border), var(--ds-shadow-rest) !important;
}

/* Fermi in basso, i tasti stanno su una barra (segnalazione ClickUp
 * 9-nov-2026, «background tasti azione in basso»; owner 10-nov-2026: bianca,
 * con un filo e un'ombra leggera). Per il piede fisso supera il «mai una
 * barra» del 22-ott e la striscia del colore della pagina del 2-nov; il piede
 * in fondo al modulo, non fermo, resta coi soli tasti. La barra resta chiara
 * anche sotto il velo di una sezione aperta: i tasti si usano. Sul telefono
 * sta sopra la barra in basso (mobile.css). */
html body .fi-main .fi-form-actions.fi-sticky {
    padding: 10px 16px !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 14px !important;
    background: var(--ds-surface) !important;
    box-shadow: var(--ds-shadow-raised) !important;
}

/* Dal tablet in su Filament lo ferma a 16px dal fondo (md:bottom-4): una
 * cornice del colore della pagina tutto intorno, che scende fino al fondo,
 * copre il contenuto che scorre lì sotto e dietro gli angoli tondi (col
 * velo, se una sezione è aperta). */
@media (min-width: 768px) {
    html body .fi-main .fi-form-actions.fi-sticky {
        /* 10px dal fondo come dai lati (owner 11-nov-2026, finestra a filo dello schermo). */
        bottom: 10px !important;
        box-shadow: var(--ds-shadow-raised), 0 0 0 8px var(--ds-bg-app), 0 10px 0 8px var(--ds-bg-app) !important;
    }

    html body.jo-focus-open .fi-main .fi-form-actions.fi-sticky {
        box-shadow: var(--ds-shadow-raised), 0 10px 0 8px var(--ds-focus-veil, rgb(15 17 23 / .12)), 0 0 0 8px var(--ds-bg-app), 0 10px 0 8px var(--ds-bg-app) !important;
    }
}

/* Contatore − / + (App\Filament\Support\Counter): corto come il numero che
   tiene, anche nel suo quarto di riga (owner 29-ott-2026). */
.jo-counter .fi-input-wrp {
    max-width: 10.5rem;
}

/* Le freccette del campo numerico farebbero il doppione di − e +. */
.jo-counter input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.jo-counter input[type="number"]::-webkit-inner-spin-button,
.jo-counter input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Campi in fila sulla stessa riga, ognuno lungo quanto il suo dato
   (QuoteRequestResource: date e ospiti .jo-stay-row; nome, telefono ed
   email .jo-field-row), a capo solo sul telefono. */
.jo-field-row > .fi-fo-component-ctn,
.jo-stay-row > .fi-fo-component-ctn {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
}

.jo-field-row > .fi-fo-component-ctn > *,
.jo-stay-row > .fi-fo-component-ctn > * {
    flex: 0 0 auto;
    min-width: 0;
}

@media (min-width: 640px) {
    /* L'avviso sotto il nome («non è nel database») corre su una riga sotto la fila. */
    .jo-field-row .jo-rqc-new { width: max-content; max-width: 40rem; }
}

/* Campi larghi uguali su una riga (es. Sconto · Motivazione · Prezzo finale); sul telefono uno per riga. */
.jo-equal-row > .fi-fo-component-ctn { display: flex !important; align-items: flex-start; gap: .75rem; }
.jo-equal-row > .fi-fo-component-ctn > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 639px) {
    .jo-equal-row > .fi-fo-component-ctn { flex-wrap: wrap; }
    .jo-equal-row > .fi-fo-component-ctn > * { flex-basis: 100%; }
}


/* La strada non scelta (x-show) non lascia la sua cella vuota nella griglia. */
.fi-fo-component-ctn > div:has(> .jo-path[style*="display: none"]) {
    display: none;
}

/* Scelta fra due strade (es. Richiedente: richiesta o contatto): pulsanti
   affiancati, ognuno lungo quanto la sua etichetta, su una riga. */
.jo-choice .fi-btn {
    white-space: nowrap;
}
/* Telefono: le due strade si dividono la riga e l'etichetta va a capo, mai fuori dalla card. */
@media (max-width: 639px) {
    .fi-btn-group.jo-choice { display: flex; width: 100%; }
    .fi-btn-group.jo-choice > .fi-btn { flex: 1 1 0 !important; min-width: 0; white-space: normal; text-align: center; }
}

.jo-stay-row .jo-counter .fi-input-wrp {
    width: 10.5rem;
}

/* Arrivo e partenza in un calendario solo: lungo quanto «12/12/2026 - 15/12/2026»;
   in una colonna stretta (compositore del preventivo) si stringe fino a 12.5rem
   invece di mandare a capo i contatori. */
.jo-stay-row > .fi-fo-component-ctn > div:has(.jo-stay-range) {
    flex: 1 1 12.5rem;
    max-width: 15rem;
}

.jo-stay-range {
    width: 100%;
}

/* Trattamento (col motore, owner 29-ott-2026): in fila dopo gli ospiti, lungo quanto «Pernottamento e colazione». */
.jo-stay-row > .fi-fo-component-ctn > div:has(.jo-stay-board) {
    flex: 1 1 11rem;
    max-width: 15rem;
}

/* Colonna stretta (compositore del preventivo, con l'anteprima accanto): calendario
   e tre contatori (Adulti · Bambini · Cani) restano su una riga, più compatti. */
.jo-stay-row { container-type: inline-size; }

@container (max-width: 640px) {
    .jo-stay-row > .fi-fo-component-ctn { column-gap: .75rem; }
    .jo-stay-row > .fi-fo-component-ctn > div:has(.jo-stay-range) { flex-basis: 11rem; }
    .jo-stay-row .jo-counter .fi-input-wrp { width: 7rem; }
    /* Lo spazio lo perdono i bordi di − e +, non il numero. */
    .jo-stay-row .jo-counter .fi-input-wrp-prefix, .jo-stay-row .jo-counter .fi-input-wrp-suffix { padding-inline: .25rem; }
    .jo-stay-row .jo-counter .fi-input { padding-inline: 0; }
}

/* Telefono: le date su tutta la riga, i contatori due per riga. */
@media (max-width: 639px) {
    .jo-stay-row > .fi-fo-component-ctn > * {
        flex: 1 1 calc(50% - .625rem);
    }

    .jo-stay-row > .fi-fo-component-ctn > div:has(.jo-stay-range) {
        flex-basis: 100%;
        max-width: none;
    }

    .jo-stay-row > .fi-fo-component-ctn > div:has(.jo-stay-range),
    .jo-stay-range,
    .jo-field-row > .fi-fo-component-ctn {
        flex-wrap: wrap;
    }

    .jo-field-row > .fi-fo-component-ctn > * {
        flex-basis: 100%;
        width: 100%;
    }

    .jo-stay-row .jo-counter .fi-input-wrp {
        width: 100%;
    }
}

/* Parti di un passo (owner 30-ott-2026, Emetti voucher › Destinatario e
   dedica): un titolo e i suoi campi, niente riquadro né tab; dalla seconda
   parte in poi un filetto tratteggiato sopra, come la riga «aggiungi
   servizio» del Preventivatore. Fieldset con .jo-fpart (.jo-fpart-next). */
/* Selettore rinforzato: vince sul riquadro grigio dei blocchi «.border
   .rounded-xl» dentro le sezioni (joorna-refine.css). */
html .fi-section .fi-section-content .fi-fieldset.jo-fpart.jo-fpart {
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
}

html .fi-fieldset.jo-fpart > legend {
    float: left;
    width: 100%;
    margin: 0 !important;
    padding: 0 0 8px !important;
    transform: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ds-text-primary);
}

html .fi-fieldset.jo-fpart > legend + * {
    clear: both;
}

html .fi-section .fi-section-content .fi-fieldset.jo-fpart.jo-fpart.jo-fpart-next {
    padding-top: 16px !important;
    border-top: 1px solid var(--ds-border) !important;
}

/* Una riga di campi e interruttori (Catalogo voucher › Nome e valore, owner
   30-ott-2026): in fila finché c'è spazio, poi a capo; gli interruttori sulla
   linea dei campi, larghi quanto la loro etichetta. */
.jo-field-row.jo-fr-wrap > .fi-fo-component-ctn {
    flex-wrap: wrap;
    align-items: flex-end;
}

.jo-field-row.jo-fr-wrap > .fi-fo-component-ctn > div:has(.fi-fo-toggle) {
    flex: 0 0 auto;
    padding-bottom: 8px;
}

/* Tessera di modulo (owner 10-nov-2026, Scheda hotel › Prenotazione e ospiti,
   la tessera «Animali» della proposta B; Tiles::formTile): riquadro come le
   tessere delle schede, il titolo in alto, i campi sotto su 12 colonne (14px
   fra le colonne, come la card), il bordo viola mentre la compili. In «Quali»
   e «Disponibili» la parolina «escludi» dei segmenti sta a destra sulla riga
   dell'etichetta, la tendina resta larga quanto la sua cella. */
html .jo-form-tile {
    padding: 16px 18px 18px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-card);
    background: var(--ds-surface);
    transition: border-color .15s, box-shadow .15s;
}

html .jo-form-tile:focus-within {
    border-color: var(--ds-accent);
    box-shadow: 0 0 0 3px var(--ds-accent-soft);
}

html .jo-form-tile > .fi-fo-component-ctn {
    gap: 12px 14px;
}

html .jo-form-tile-title {
    margin: 0;
    font-size: var(--ds-fs-h4);
    font-weight: 600;
    color: var(--ds-text-primary);
}

html .jo-form-tile .jo-seg-line > .fi-fo-component-ctn {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
}

html .jo-form-tile .jo-seg-line > .fi-fo-component-ctn > div:has(> .jo-incl-switch) {
    position: absolute;
    top: 0;
    right: 0;
    /* Senza riga e colonna: il riferimento è la riga intera, non la cella dei segmenti. */
    grid-row: auto;
    grid-column: auto !important;
    margin-top: 0 !important;
    padding-top: 0;
    transform: none !important;
}

html .jo-form-tile .jo-seg-line .fi-fo-field-wrp:not(.jo-incl-switch) > .grid {
    grid-template-columns: minmax(0, 1fr);
}

html .jo-form-tile .jo-seg-line .fi-fo-field-wrp:not(.jo-incl-switch) > .grid > * {
    grid-column: auto;
    padding-top: 0;
}

/* Nelle schede con la barra delle sezioni (Scheda hotel, gruppo, struttura,
   impostazioni) le scelte (Bambini: Accettati / Non accettati) e le spunte delle
   liste (Dove sono ammessi) hanno la misura delle altre spunte, 13px: prima
   15px, più grandi della riga accanto (owner 10-nov-2026). */
html .jo-sec-page .fi-fo-radio label > div > span:first-child,
html .jo-sec-page span.fi-fo-checkbox-list-option-label {
    font-size: 13px;
    line-height: 20px;
}

/* Una parte che si apre con la freccetta (Shop online › Link e codice per il
   sito, utente 30-ott-2026: serve solo a chi mette lo shop sul sito): titolo e
   filetto come le parti .jo-fpart-next, il contenuto chiuso. */
details.jo-fpart-more {
    padding-top: 16px;
    border-top: 1px solid var(--ds-border);
}

details.jo-fpart-more > summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-primary);
}

details.jo-fpart-more > summary::-webkit-details-marker {
    display: none;
}

details.jo-fpart-more > summary:hover {
    color: var(--ds-accent);
}

details.jo-fpart-more > summary:focus-visible {
    outline: 2px solid var(--ds-focus-ring, var(--ds-accent));
    outline-offset: 2px;
    border-radius: 4px;
}

details.jo-fpart-more > summary > svg {
    width: 16px;
    height: 16px;
    color: var(--ds-text-tertiary);
    transition: transform .15s ease;
}

details.jo-fpart-more[open] > summary > svg {
    transform: rotate(180deg);
}

details.jo-fpart-more > div {
    margin-top: 10px;
}

/* La stessa riga con la freccetta quando dentro ci sono campi del modulo
   (Shop online › Lingue › Traduzioni dei tuoi testi): un pulsante apre e
   chiude il gruppo accanto (Alpine, x-show). */
.jo-fold-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ds-text-primary);
}

.jo-fold-btn:hover {
    color: var(--ds-accent);
}

.jo-fold-btn:focus-visible {
    outline: 2px solid var(--ds-focus-ring, var(--ds-accent));
    outline-offset: 2px;
    border-radius: 4px;
}

.jo-fold-btn .jo-fold-state {
    font-weight: 400;
    color: var(--ds-text-tertiary);
}

.jo-fold-btn > svg {
    width: 16px;
    height: 16px;
    color: var(--ds-text-tertiary);
    transition: transform .15s ease;
}

.jo-fold-btn.is-open > svg {
    transform: rotate(180deg);
}

/* Shop online › Cosa è in vendita (utente 30-ott-2026): una riga per voce
   anche accanto all'anteprima (nessun importo da mandare sotto); fra le
   voci non in vendita le prime cinque, le altre con «Mostra altre». */
@container jo-sale (max-width: 720px) {
    .jo-sale-compact .jo-sale-line > .fi-fo-component-ctn {
        flex-wrap: nowrap;
        padding-left: 0;
    }

    .jo-sale-compact .jo-sale-line > .fi-fo-component-ctn > :first-child {
        flex: 1 1 0;
        margin-left: 0;
    }
}

@container jo-sale (max-width: 420px) {
    .jo-sale-compact .jo-sale-line label:has([role=switch]) span {
        display: none;
    }
}

/* Sempre il posto della maniglia, anche con una voce sola nel gruppo: gli
   interruttori restano in colonna da un gruppo all'altro. */
html .jo-sale-list.jo-sale-compact .fi-fo-repeater-item:nth-child(n) > .fi-fo-repeater-item-content {
    padding-right: 32px !important;
}

.jo-fpart:not(.is-more) .jo-sale-five .fi-fo-repeater-item:nth-child(n+6) {
    display: none;
}

/* La stessa parte che si apre, quando dentro ci sono campi: una sezione
   Filament richiudibile (FormResource::foldPart, form di contatto FC2), col
   titolo e la freccetta delle parti e senza riquadro. form-wheel.js non la
   mette in tab. Selettore lungo e !important: le sezioni richiudibili dentro
   una card hanno già riquadro e ombra con !important. */
html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside),
html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside):focus-within {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    border-top: 1px solid var(--ds-border) !important;
    border-radius: 0 !important;
    padding: 16px 0 0 !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-header {
    padding: 0 !important;
    border-bottom: 0 !important;
    background: transparent !important;
    cursor: pointer;
}

/* Aperta resta una parte: niente fascia lilla né filetto viola delle card aperte. */
html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside)::before,
html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside)::after {
    display: none !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-header .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
    font-weight: 600 !important;
    color: var(--ds-text-primary);
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-header:hover .fi-section-header-heading {
    color: var(--ds-accent);
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-header .fi-section-header-description {
    font-size: 12.5px;
    color: var(--ds-text-tertiary);
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-content-ctn {
    border-top: 0 !important;
}

html body .fi-section.jo-fcard .fi-section.fi-section.fi-section.fi-section.jo-fpart-fold.jo-fpart-fold:not(.jo-fcard):not(.fi-aside) > .fi-section-content-ctn > .fi-section-content {
    padding: 12px 0 0 !important;
}

/* Le voci tipiche da accendere sotto quelle in vendita (Catalogo voucher ›
   versioni e camere, owner 30-ott-2026, come l'Upselling del Preventivatore):
   righe .jo-sale-line con «In vendita» spento, «Mostra altre» dopo sei righe. */
.jo-offers > .fi-fo-component-ctn {
    gap: 0;
}

.jo-offers .fi-fo-placeholder {
    font-size: 12.5px;
    color: var(--ds-text-tertiary);
}

.jo-offers > .fi-fo-component-ctn > :first-child .fi-fo-placeholder {
    padding-bottom: 6px;
}

.jo-offers-more {
    font-size: 13px;
    font-weight: 500;
    color: var(--ds-accent-fg);
}

.jo-offers-more:hover {
    color: var(--ds-accent);
}

/* Riga dei «+» che aprono una parte facoltativa sul posto (Shop online › Sul
   tuo sito: «+ Testi dello shop · + Aspetto dello shop», owner 9-nov-2026). */
.jo-plus-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

/* Le parti chiuse non lasciano il loro spazio: la distanza la dà la linea della parte aperta. */
.jo-plus-parts > .fi-fo-component-ctn {
    row-gap: 0 !important;
}

/* Foto del Catalogo voucher (owner 30-ott-2026): un campo «Trascina o
   sfoglia» in fondo alla riga del nome, alto e largo come gli altri; con delle
   foto il campo prende una riga sua e le foto stanno sotto, piccole. */
.jo-field-row.jo-fr-wrap > .fi-fo-component-ctn > div:has(.jo-photos .filepond--item) {
    flex-basis: 100%;
    max-width: none;
}

.jo-photos .filepond--root {
    min-height: 36px;
    background: transparent !important;
    box-shadow: none !important;
}

.jo-photos .filepond--panel-root {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.jo-photos .filepond--root .filepond--drop-label {
    right: auto;
    width: 100%;
    max-width: 11rem;
    min-height: 36px !important;
    height: 36px;
}

.jo-photos .filepond--drop-label label {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 10px !important;
    line-height: 34px !important;
    text-align: center;
    border: 1px solid var(--ds-border-strong, var(--ds-border));
    border-radius: 8px;
    background: var(--ds-surface);
    font-size: 13px;
    color: var(--ds-text-secondary);
    white-space: nowrap;
    cursor: pointer;
}

.jo-photos .filepond--drop-label label u {
    color: var(--ds-accent-fg);
}

.jo-photos .filepond--drop-label label:hover {
    border-color: var(--ds-accent);
}

.jo-photos .filepond--root .filepond--item {
    width: 72px !important;
}

.jo-photos .filepond--file-info,
.jo-photos .filepond--file-status {
    display: none;
}

.jo-photos .filepond--list {
    left: 0 !important;
    right: 0 !important;
}

/* Una riga di servizio o di versione (owner 7-ott-2026, Upselling del
   Preventivatore; dal 30-ott-2026 anche versioni e camere del Catalogo voucher,
   vista filament.quotes.detail.service-row): miniatura, nome · prezzo, la
   descrizione e cosa vede l'ospite, ogni testo su una riga. */
.jo-qsvc-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jo-qsvc-thumb { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; background: var(--ds-surface-sunken); }
.jo-qsvc-thumb--empty { display: inline-flex; align-items: center; justify-content: center; color: var(--ds-text-tertiary); }
.jo-qsvc-thumb--empty svg { width: 18px; height: 18px; }
.jo-qsvc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.jo-qsvc-text strong { font-size: 13.5px; font-weight: 600; color: var(--ds-text-primary); overflow-wrap: anywhere; }
.jo-qsvc-text small { font-size: 12px; color: var(--ds-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-qsvc-price { flex: none; font-size: 13px; font-weight: 500; color: var(--ds-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jo-qsvc-sees { font-size: 12px; color: var(--ds-text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Nome · prezzo su una riga: nella colonna stretta del compositore il nome si taglia, il prezzo resta intero. */
.jo-qsvc-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.jo-qsvc-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-qsvc-text .jo-qsvc-price { font-size: 12.5px; }

/* Righe da vendere del Catalogo voucher (owner 30-ott-2026, come l'Upselling):
   la riga a sinistra, gli importi e «In vendita» a destra, un filetto fra le righe. */
.jo-sale-line {
    padding: 10px 0;
    border-top: 1px solid var(--ds-row-divider, var(--ds-border));
}

.jo-sale-line > .fi-fo-component-ctn {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
}

.jo-sale-line > .fi-fo-component-ctn > * {
    grid-column: auto !important;
    flex: none;
}

.jo-sale-line > .fi-fo-component-ctn > :first-child {
    flex: 1 1 200px;
    min-width: 0;
}

.jo-sale-line .jo-sale-amount {
    width: 9.5rem;
}

.jo-sale-line .fi-input-wrp-prefix,
.jo-sale-line label:has([role=switch]) span {
    font-size: 12px;
    white-space: nowrap;
}

/* Le righe in vendita: il nome sta nella riga, la maniglia per riordinare a
   destra a metà riga (come l'Upselling); in una colonna stretta (anteprima
   aperta) importi e interruttore vanno sotto, allineati al testo. */
.jo-sale-list {
    container: jo-sale / inline-size;
}

html .jo-sale-list .fi-fo-repeater-item {
    position: relative;
}

html .jo-sale-list .fi-fo-repeater-item > .fi-fo-repeater-item-header {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 1;
    padding: 0 !important;
    transform: translateY(-50%);
}

html .jo-sale-list .fi-fo-repeater-item > .fi-fo-repeater-item-content {
    padding: 0 32px 0 0 !important;
}

html .jo-sale-list .fi-fo-repeater-item:only-child > .fi-fo-repeater-item-content {
    padding-right: 0 !important;
}

html .jo-sale-list .fi-fo-repeater-item + .fi-fo-repeater-item {
    padding-top: 0;
    border-top: 0 !important;
}

html .jo-sale-list .fi-fo-repeater-item:first-child .jo-sale-line {
    border-top: 0;
}

@container jo-sale (max-width: 720px) {
    .jo-sale-line > .fi-fo-component-ctn {
        padding-left: 52px;
    }

    .jo-sale-line > .fi-fo-component-ctn > :first-child {
        flex-basis: calc(100% + 52px);
        margin-left: -52px;
    }
}

/* Telefono: anche nelle righe spente l'interruttore va sotto, allineato al testo. */
@media (max-width: 639px) {
    .jo-offers .jo-sale-line > .fi-fo-component-ctn {
        padding-left: 52px;
    }

    .jo-offers .jo-sale-line > .fi-fo-component-ctn > :first-child {
        flex-basis: calc(100% + 52px);
        margin-left: -52px;
    }
}

/* Una riga di Invio (owner 30-ott-2026): il titolo sopra, i pulsanti e,
   accanto, il campo della scelta (i segmenti, la data e ora) allineato ai
   pulsanti; tutto dallo stesso margine, a capo solo se non c'è spazio. */
.jo-send-row > .fi-fo-component-ctn {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
}

.jo-send-row > .fi-fo-component-ctn > * {
    grid-column: auto !important;
    /* Si stringono fino alla riga: sul telefono i pulsanti vanno a capo. */
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}

.jo-send-row > .fi-fo-component-ctn > div:has(.jo-send-pick) {
    flex: 1 1 9rem;
    max-width: 26rem;
}

/* La casella accanto a campi stretti (regole delle automazioni: «Soglia
   della struttura», «Anche senza voto»): al centro dell'input. */
.jo-send-row > .fi-fo-component-ctn > div:has(> .jo-incl-switch) {
    padding-bottom: 9px;
}

/* Includi / Escludi dei filtri dei segmenti (owner 3-nov-2026: un
   interruttore, non due pulsanti grandi, attaccato al campo a cui si
   riferisce): il campo col suo nome sopra e, sulla riga dell'input, subito a
   destra, l'interruttore «Escludi». */
.jo-incl-row > .fi-fo-component-ctn {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
}
/* Con le due chiavi piene (segmento vecchio) i due campi vanno a capo. */
.jo-incl-row > .fi-fo-component-ctn > div {
    grid-column: auto !important;
    flex: 1 1 10rem;
    min-width: 0;
}
.jo-incl-row > .fi-fo-component-ctn > div:has(> .jo-incl-switch) {
    order: 2;
    flex: 0 0 auto;
    /* Al centro dell'input (38px) o della riga di etichette. */
    padding-bottom: 9px;
}
.jo-incl-switch .fi-fo-field-wrp-label span { font-size: 13px; font-weight: 400; color: var(--ds-text-secondary); }
/* Una regola per riga (automazioni): il campo largo quanto serve, l'interruttore accanto. */
.jo-incl-row--fit > .fi-fo-component-ctn > div:not(:has(> .jo-incl-switch)) { max-width: 28rem; }

/* Scelta multipla: le voci scelte si vedono tutte, quelle che non ci stanno
   vanno a capo e il campo si allunga (owner 19-nov-2026, card «Campi dei
   form»; dal 3-nov su una riga che doveva scorrere di lato, ma non scorreva e
   le ultime restavano tagliate). Con voci scelte il segnaposto sparisce. */
.fi-fo-field-wrp .choices[data-type="select-multiple"] .choices__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
}
.fi-fo-field-wrp .choices[data-type="select-multiple"] .choices__list--multiple { display: contents; }
.fi-fo-field-wrp .choices[data-type="select-multiple"] .choices__list--multiple > .choices__item { margin: 0; }
.fi-fo-field-wrp .choices[data-type="select-multiple"] .choices__input--cloned {
    flex: 1 0 3rem;
    /* Choices la fa larga quanto il segnaposto (stile in linea). */
    min-width: 3rem !important;
    width: auto !important;
}
.fi-fo-field-wrp .choices[data-type="select-multiple"] .choices__inner:has(> .choices__list--multiple > .choices__item) > .choices__input::placeholder { color: transparent; }

/* Voci da scegliere in vista (ToggleButtons, es. i tag di partenza dei
   segmenti): etichette piccole a pillola, non pulsanti pieni. */
.jo-chip-choice .fi-fo-toggle-buttons { gap: 6px; }
.jo-chip-choice .fi-fo-toggle-buttons .fi-btn {
    min-height: 0;
    padding: 3px 11px;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
}

/* La riga che spiega la scelta di «Quando», attaccata ai pulsanti. */
.jo-send-hint {
    font-size: 12.5px;
    color: var(--ds-text-tertiary);
}

/* Invio in una frase (owner 5-nov-2026, Sentence): «42 persone» col suo grigio
   e la «i»; la tendina ancora da scegliere («scegli quando») più tenue; la data
   larga quanto serve. */
.jo-sentence-note {
    color: var(--ds-text-secondary);
}

.jo-sentence-tip {
    display: inline-flex;
    vertical-align: -2px;
    color: var(--ds-text-tertiary);
    cursor: help;
}

.jo-sentence-tip svg {
    width: 15px;
    height: 15px;
}

.jo-sentence-tip:focus-visible {
    border-radius: 999px;
    outline: none;
    box-shadow: 0 0 0 3px var(--ds-focus-ring, rgba(124, 92, 203, .3));
}

html .jo-sentence-pick.is-empty {
    font-weight: 400;
}

html .jo-sentence-pick:disabled {
    border-bottom-color: var(--ds-border);
    color: var(--ds-text-tertiary);
    cursor: not-allowed;
}

.jo-send-at .fi-input-wrp {
    max-width: 240px;
}

/* Automazioni, Invio in una frase (owner 5-nov-2026): la riga «Quanto» di «altro…» col
   contatore e, accanto, giorni o ore, prima o dopo; gli indirizzi dello staff col nome a
   sinistra come le altre righe (jo-seg-line-field), il segnaposto non ha il suo contenitore. */
.jo-send-quanto > .fi-fo-component-ctn {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.jo-send-quanto .jo-counter {
    flex: 0 1 auto;
}

.fi-fo-field-wrp:has(.jo-send-staff) > .grid {
    grid-template-columns: 170px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
}

.fi-fo-field-wrp:has(.jo-send-staff) > .grid > :not(:first-child) {
    grid-column: 2;
}

.fi-fo-field-wrp:has(.jo-send-staff) .fi-fo-field-wrp-label span {
    font-size: 13px;
    font-weight: 400;
    color: var(--ds-text-secondary) !important;
}

/* Una frase da completare (Sentence): i campi che la frase scrive restano nel modulo (nascosti)
   e le righe chiuse (Quanto, l'evento nuovo, la data) non lasciano celle vuote, che con lo spazio
   della griglia facevano un vuoto sotto la frase (scheda dell'automazione, owner 5-nov-2026). */
.fi-fo-component-ctn:has(> div > .jo-sentence) > div:not(:has(.jo-sentence, .fi-fo-field-wrp, .fi-fo-actions)) {
    display: none;
}

/* I tempi delle email (automazioni): la cella c'è solo con la riga Quanto o Giorno e ora aperta. */
.fi-fo-component-ctn:has(> div > .jo-sentence) > div:has(.jo-send-steps):not(:has(.jo-send-quanto:not([style*="display"]), .jo-send-at)) {
    display: none;
}

/* «Altre opzioni» in fondo all'Invio delle automazioni, sotto la linea tratteggiata come nelle campagne. */
.jo-send-more {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--ds-border);
}

/* Le righe del pubblico (Segmenti, Strutture) sotto quelle della partenza, staccate come fra due campi. */
.jo-send-who:has(.fi-fo-field-wrp) {
    margin-top: 16px;
}

/* Solo il campo della riga, non un blocco che contiene anche i pulsanti
   (il «Quando» delle automazioni, sotto la riga tratteggiata). */
/* Mai una card intera (owner 5-nov-2026: una riga d'aiuto dentro un passo
   tirava su tutto il passo, che finiva sopra quello prima). */
.fi-fo-component-ctn > div:has(> .fi-fo-field-wrp .jo-send-hint):not(:has(.jo-send-row)):not(:has(> .fi-section)),
.fi-fo-component-ctn > div:has(.jo-send-hint):not(:has(.jo-send-row)):not(:has(> .fi-section)) {
    margin-top: -16px;
}

/* La riga che spiega una parte di un passo, subito sotto il suo titolo
   (owner 5-nov-2026, es. le domande del Nuovo segmento). */
.jo-fpart-hint {
    font-size: 13px;
    line-height: 18px;
    color: var(--ds-text-tertiary);
}

/* ── Intervallo di date in un calendario solo (segnalazione 3-nov-2026) ──
   <x-jo.date-range> (public/js/date-range.js): il campo mostra «dal – al»,
   un clic apre il mese; il primo giorno scelto è l'inizio, il secondo la
   fine, i giorni in mezzo in viola tenue. */
.jo-dr {
    position: relative;
    display: inline-flex;
    min-width: 0;
}
.jo-dr-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    background: var(--ds-surface);
    font-size: 13px;
    white-space: nowrap;
    color: var(--ds-text-primary);
}
.jo-dr-field:hover,
.jo-dr-field[aria-expanded="true"] {
    border-color: var(--ds-accent);
}
.jo-dr-ic {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--ds-text-secondary);
}
.jo-dr-pop {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    right: 0;
    width: 260px;
    padding: 10px;
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-raised);
}
.jo-dr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ds-text-primary);
}
.jo-dr-head button {
    display: inline-flex;
    padding: 4px;
    border-radius: 6px;
}
.jo-dr-head button:hover {
    background: var(--ds-accent-soft);
}
.jo-dr-week,
.jo-dr-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
    text-align: center;
}
.jo-dr-week span {
    padding: 2px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--ds-text-secondary);
}
.jo-dr-days button {
    height: 30px;
    font-size: 12.5px;
    color: var(--ds-text-primary);
    border-radius: 6px;
}
.jo-dr-days button:not(:disabled):hover {
    background: var(--ds-accent-soft);
}
.jo-dr-days button:disabled:not(.is-blank) {
    color: var(--ds-border);
    cursor: default;
}
.jo-dr-days button.is-today {
    font-weight: 700;
}
.jo-dr-days button.is-in {
    border-radius: 0;
    background: var(--ds-accent-soft);
}
.jo-dr-days button.is-start,
.jo-dr-days button.is-end {
    background: var(--ds-accent);
    font-weight: 600;
    color: var(--ds-surface);
}
.jo-dr-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--ds-text-secondary);
}
.jo-dr-clear {
    font-weight: 600;
    color: var(--ds-accent);
}

/* Dentro un pannello (imbuto di una colonna): il mese sempre aperto, senza campo. */
.jo-dr.is-inline {
    display: block;
}
.jo-dr.is-inline .jo-dr-pop {
    position: static;
    width: 100%;
    padding: 0;
    border: 0;
    box-shadow: none;
}

/* ── Disegno morbido (owner 4-nov-2026, tavola «Nuova automazione come
   sequenza»: «più arrotondate, quelle checkbox mi piacciono, i tasti più
   eleganti, i campi di testo anche»), in tutta la piattaforma. Angoli dai
   token (--ds-radius-control 10px, --ds-radius-card 16px); campi alti 38px
   (sopra, «Controlli»). ── */

/* Card staccate dal fondo: ombra morbida al posto del bordo (in scuro resta
   il bordo, l'ombra non si vede). Stesso gruppo di design-system.css. */
html:not(.dark) .fi-section:not(.fi-section-not-contained):not(.fi-aside):not(.jo-qb):not(.jo-psec):not(.fi-section .fi-section),
html:not(.dark) .fi-ta-ctn,
html:not(.dark) .fi-wi-stats-overview-stat,
html:not(.dark) .jo-kpi,
html:not(.dark) .jo-listcard {
    border-color: transparent !important;
    box-shadow: var(--ds-shadow-card) !important;
}

/* La barra delle tabelle e la paginazione restano compatte: Cerca e «per
   pagina» alti come i pulsanti accanto (34px). */
.fi-ta-ctn .fi-input-wrp {
    min-height: 34px;
}

/* Nei 38px il testo al centro, alla stessa altezza di prefisso e suffisso. */
.fi-input-wrp-input:has(> input.fi-input, > select.fi-select-input) {
    display: flex;
    align-items: center;
}

/* Campi: il bordo si legge (--ds-border-strong, era --ds-border). */
html:not(.dark) .fi-input-wrp:not(:focus-within),
html:not(.dark) .fi-fo-select .choices__inner,
html:not(.dark) .fi-fo-tags-input {
    --tw-ring-color: var(--ds-border-strong) !important;
}

/* Pulsanti: angoli come i campi; quelli di scelta (ToggleButtons) col testo
   meno pesante e il bordo dei campi. La scelta resta lilla, mai viola pieno. */
html .fi-btn:not(.fi-btn-group .fi-btn) {
    border-radius: var(--ds-radius-control) !important;
}

html .fi-fo-toggle-buttons .fi-btn {
    font-weight: 500 !important;
}

html:not(.dark) .fi-fo-toggle-buttons input:not(:checked) + .fi-btn:not(.fi-btn-group .fi-btn) {
    box-shadow: 0 0 0 1px var(--ds-border-strong) !important;
}

/* Pulsanti raggruppati (es. Nella pagina · Popup · Bottone flottante): gli
   angoli solo agli estremi del gruppo, i separatori restano quelli di
   Filament, il bordo della scelta dentro il pulsante (il vicino lo tagliava). */
html .fi-btn-group {
    border-radius: var(--ds-radius-control) !important;
}

html:not(.dark) .fi-btn-group {
    --tw-ring-color: var(--ds-border-strong) !important;
}

html .fi-btn-group > .fi-btn:nth-child(1 of .fi-btn) {
    border-start-start-radius: var(--ds-radius-control) !important;
    border-end-start-radius: var(--ds-radius-control) !important;
}

html .fi-btn-group > .fi-btn:nth-last-child(1 of .fi-btn) {
    border-start-end-radius: var(--ds-radius-control) !important;
    border-end-end-radius: var(--ds-radius-control) !important;
}

html .fi-body .fi-btn-group input:checked + .fi-btn.bg-white {
    box-shadow: inset 0 0 0 1px var(--ds-accent) !important;
}

/* Sì/no come interruttori veri (owner 11-nov-2026, «come iPhone e Mac»;
   dal 4-nov al 10-nov erano disegnati da casella): al computer piccoli come
   su macOS, al telefono grandi come su iPhone. Acceso nel viola JOORNA (è
   un controllo: viola = interazione), spento grigio; la manopola bianca
   scivola. Le caselle restano per scegliere più voci da un elenco. */
/* Tutti gli interruttori hanno lo stesso disegno: Toggle dei form, ToggleColumn delle
   tabelle, ConfirmToggleColumn e quelli scritti a mano (.jo-switch, anche
   <input type="checkbox" class="jo-switch"> negli editor e nei filtri). */
html .fi-fo-toggle,
html .fi-ta-toggle [role="switch"],
html .jo-switch {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    flex: none;
    width: 38px !important;
    height: 22px !important;
    margin-block: 1px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--ds-border-strong) !important;
    box-shadow: none !important;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color .2s ease;
}

html .fi-fo-toggle > span,
html .fi-ta-toggle [role="switch"] > span,
html .jo-switch > span {
    position: static !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    margin: 2px;
    border-radius: 999px !important;
    background: #FFFFFF !important;
    box-shadow: 0 1px 3px rgb(0 0 0 / .25) !important;
    transform: translateX(0) !important;
    transition: transform .22s cubic-bezier(.2, .9, .3, 1.2) !important;
}

html .fi-fo-toggle > span > span,
html .fi-ta-toggle [role="switch"] > span > span {
    display: none !important;
}

html .fi-fo-toggle[aria-checked="true"],
html .fi-ta-toggle [role="switch"][aria-checked="true"],
html .jo-switch.is-on {
    background: var(--ds-accent) !important;
}

html .fi-fo-toggle[aria-checked="true"] > span,
html .fi-ta-toggle [role="switch"][aria-checked="true"] > span,
html .jo-switch.is-on > span {
    transform: translateX(16px) !important;
}

/* La casella sì/no scritta a mano: la manopola è uno sfondo che scivola. */
html input.jo-switch[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    background: radial-gradient(circle, #FFFFFF 8.5px, rgb(0 0 0 / .14) 9px, transparent 10px) 0 0 / 22px 22px no-repeat, var(--ds-border-strong) !important;
    transition: background-color .2s ease, background-position .22s cubic-bezier(.2, .9, .3, 1.2);
}

html input.jo-switch[type="checkbox"]:checked {
    background: radial-gradient(circle, #FFFFFF 8.5px, rgb(0 0 0 / .14) 9px, transparent 10px) 16px 0 / 22px 22px no-repeat, var(--ds-accent) !important;
}

html .fi-fo-toggle:focus-visible,
html .fi-ta-toggle [role="switch"]:focus-visible,
html .jo-switch:focus-visible {
    outline: 2px solid var(--ds-accent);
    outline-offset: 2px;
}

html .jo-switch:disabled {
    cursor: default;
    opacity: .5;
}

@media (max-width: 640px) {
    html .fi-fo-toggle,
    html .fi-ta-toggle [role="switch"],
    html .jo-switch {
        width: 51px !important;
        height: 31px !important;
    }

    html .fi-fo-toggle > span,
    html .fi-ta-toggle [role="switch"] > span,
    html .jo-switch > span {
        width: 27px !important;
        height: 27px !important;
    }

    html .fi-fo-toggle[aria-checked="true"] > span,
    html .fi-ta-toggle [role="switch"][aria-checked="true"] > span,
    html .jo-switch.is-on > span {
        transform: translateX(20px) !important;
    }

    html input.jo-switch[type="checkbox"] {
        background: radial-gradient(circle, #FFFFFF 13px, rgb(0 0 0 / .14) 13.5px, transparent 14.5px) 0 0 / 31px 31px no-repeat, var(--ds-border-strong) !important;
    }

    html input.jo-switch[type="checkbox"]:checked {
        background: radial-gradient(circle, #FFFFFF 13px, rgb(0 0 0 / .14) 13.5px, transparent 14.5px) 20px 0 / 31px 31px no-repeat, var(--ds-accent) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html .fi-fo-toggle,
    html .fi-fo-toggle > span,
    html .fi-ta-toggle [role="switch"],
    html .fi-ta-toggle [role="switch"] > span,
    html .jo-switch,
    html .jo-switch > span {
        transition: none !important;
    }
}

html .fi-checkbox-input {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    --tw-ring-color: var(--ds-border-strong);
}

/* L'icona del passo accanto al numero (StepIcons, owner 4-nov-2026): il colore
   dallo stato, come il pallino sulla linea: grigia da compilare, lilla mentre
   si compila, lime quando il passo è fatto. */
html .fi-section.jo-ftl > .fi-section-header .fi-section-header-icon {
    box-sizing: content-box;
    flex: none;
    align-self: flex-start;
    width: 18px;
    height: 18px;
    padding: 7px;
    border-radius: var(--ds-radius-control);
    background: var(--ds-off-bg);
    color: var(--ds-text-tertiary) !important;
}

html .fi-section.jo-ftl:is([data-jo-state="current"], [data-jo-state="partial"]) > .fi-section-header .fi-section-header-icon {
    background: var(--ds-accent-soft);
    color: var(--ds-accent) !important;
}

html .fi-section.jo-ftl[data-jo-state="done"] > .fi-section-header .fi-section-header-icon {
    background: var(--ds-ok-bg);
    color: var(--ds-ok-fg) !important;
}

/* La Grafica di Emetti voucher a card (design-picker.blade.php, owner
   4-nov-2026): come i blocchi dell'editor, una accanto all'altra, la
   miniatura sopra e il nome sotto, la scelta col bordo viola. */
.jo-dpick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

/* Tutte in una riga, Nuova grafica compresa (owner 4-nov-2026), dal tablet in su;
   sul telefono vanno a capo. */
@media (min-width: 768px) {
    .jo-dpick {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

.jo-dpick-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 4px;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-control);
    background: var(--ds-surface);
    text-align: left;
    cursor: pointer;
}

.jo-dpick-card:hover {
    border-color: var(--ds-accent);
}

.jo-dpick-card.is-on {
    border-color: var(--ds-accent);
    background: var(--ds-accent-soft);
    box-shadow: 0 0 0 1px var(--ds-accent);
}

.jo-dpick-thumb {
    display: flex;
    height: 68px;
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--ds-radius-control) - 4px);
    background: var(--ds-surface-2);
    overflow: hidden;
}

.jo-dpick-thumb--new {
    border: 1px dashed var(--ds-border-strong);
    background: transparent;
    color: var(--ds-accent);
}

.jo-dpick-thumb--new svg {
    width: 22px;
    height: 22px;
}

/* Il nome su due righe al massimo, intero nel tooltip (title). */
.jo-dpick-name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ds-text-primary);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.jo-dpick-card.is-on .jo-dpick-name {
    color: var(--ds-accent);
}

/* Testata dei passi in gerarchia (owner 5-nov-2026: «un'accozzaglia di cose»):
   il numero dentro il pallino della linea, ✓ quando il passo è fatto; accanto
   al titolo niente icona né «01»; il titolo in evidenza, sotto la descrizione
   in grigio, lo stato piccolo a destra col suo pallino colorato. Vale per ogni
   creazione sulla linea dei passi (.jo-ftl). */
html .fi-section.jo-ftl > .fi-section-header .fi-section-header-icon {
    display: none !important;
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading::before {
    content: none !important;
}

html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header::before {
    content: counter(jo-fstep);
    display: flex;
    align-items: center;
    justify-content: center;
    left: -39px;
    top: 20px;
    width: 22px;
    height: 22px;
    color: var(--ds-text-tertiary);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

html .fi-section.fi-section.jo-fstep.jo-ftl:is([data-jo-state="current"], [data-jo-state="partial"]) > .fi-section-header::before {
    border-color: var(--ds-accent);
    background: var(--ds-accent);
    color: var(--ds-on-accent);
}

/* La linea si ferma ai bordi del pallino più grande (22px, prima 18). */
html .fi-section.fi-section.jo-fstep.jo-ftl::after {
    background: linear-gradient(to bottom, var(--jo-ftl-up) 0 21px, transparent 21px 43px, var(--jo-ftl-down) 43px 100%);
}

html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-last::after {
    height: 21px;
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading {
    width: 100%;
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge::before {
    content: "";
    display: inline-block;
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ds-text-placeholder);
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge[data-state="current"]::before {
    background: var(--ds-accent);
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge[data-state="partial"]::before {
    background: var(--ds-warn-dot);
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge[data-state="done"] {
    color: var(--ds-ok-fg);
}

html .fi-section.jo-ftl > .fi-section-header .fi-section-header-heading .jo-fstep-badge[data-state="done"]::before {
    background: var(--ds-tag-green);
}

@media (max-width: 767px) {
    html .fi-section.fi-section.jo-fstep.jo-ftl > .fi-section-header::before {
        left: -31px;
        top: 19px;
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl::after {
        background: linear-gradient(to bottom, var(--jo-ftl-up) 0 19px, transparent 19px 41px, var(--jo-ftl-down) 41px 100%);
    }

    html .fi-section.fi-section.jo-fstep.jo-ftl.jo-fstep-last::after {
        height: 19px;
    }
}

/* ── Righe come le Impostazioni di iPhone e Mac (owner 11-nov-2026, P1 + P2;
   App\Filament\Support\FormRows, prima prova in Regole per gli ospiti) ──
   Il gruppo è un fieldset bianco con un filo e il titoletto sul bordo, in alto
   a sinistra («B come fieldset», owner 11-nov-2026); le righe divise da una
   linea sottile. A sinistra cosa è (e sotto una
   spiegazione corta), a destra il valore: i campi della stessa cosa stanno
   compatti sulla stessa riga. Un testo lungo va a riga intera sotto l'etichetta.
   Al telefono l'etichetta sta sopra. «Aggiungi» elenca le righe facoltative
   ancora vuote (P2). */
html .jo-rows { margin: 0; padding: 2px 16px 4px; border: 1px solid var(--ds-border-strong); border-radius: 12px; background: var(--ds-surface); }
/* Più forte della regola delle parti di un passo in Fieldset (grigio, senza bordo, titolo sopra). */
html body .fi-fieldset.jo-rows.jo-rows, html body .fi-section .fi-section-content .fi-fieldset.jo-rows.jo-rows { margin: 0 !important; padding: 2px 16px 4px !important; border: 1px solid var(--ds-border-strong) !important; border-color: var(--ds-border-strong) !important; border-radius: 12px !important; background: var(--ds-surface) !important; box-shadow: none !important; }
html body .fi-fieldset.jo-rows.jo-rows > legend { transform: none !important; position: static !important; float: none !important; display: block !important; width: auto !important; margin: 0 0 0 -6px !important; padding: 0 6px !important; background: var(--ds-surface) !important; font-size: var(--ds-fs-h4) !important; font-weight: 600 !important; color: var(--ds-text-primary) !important; text-transform: none !important; letter-spacing: normal !important; }
html body .fi-fieldset.jo-rows.jo-rows::before, html body .fi-fieldset.jo-rows.jo-rows::after { content: none !important; }
html .jo-rows > .fi-fo-component-ctn { gap: 0 !important; }
/* La linea fra le righe in vista (Filament lascia un div.hidden al posto di una nascosta). */
/* La linea è un tratto a parte, dritto e allineato al contenuto: col bordo della
   riga (arrotondata per l'animazione) si piegava agli angoli (owner 11-nov-2026). */
/* «In vista»: una riga col suo valore, un testo col suo campo, un blocco col suo
   contenuto. Quale riga si vede lo decide il CSS, non una domanda a ogni campo
   (che rifaceva le sue query, owner 11-nov-2026): il filo va dopo una riga in vista. */
html .jo-rows > .fi-fo-component-ctn > div:not(.hidden):is(:has(> .jo-row .jo-row-ctl > .fi-fo-component-ctn > :not(.hidden)), :has(> .jo-row.is-text:not(.is-block) > .fi-fo-component-ctn > div:nth-child(2):not(.hidden)), :has(> .jo-row.is-block > .fi-fo-component-ctn > div:first-child:not(.hidden))) ~ div:not(.hidden) > .jo-row::before { content: ""; position: absolute; top: 0; right: 8px; left: 8px; border-top: 1px solid var(--ds-border); pointer-events: none; }
html .jo-row { padding: 10px 0; }
html .jo-row > .fi-fo-component-ctn { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px !important; }
html .jo-row > .fi-fo-component-ctn > :first-child { flex: 1 1 220px; min-width: 0; }
/* I valori in una colonna larga uguale in ogni riga (owner 11-nov-2026: «non
   perfettamente allineati»): un campo la riempie, due campi della stessa cosa
   la dividono a metà; un interruttore sta in fondo a destra. 480px (prima
   360): meno vuoto in mezzo e una nota breve su una riga sola (owner 11-nov-2026).
   In una colonna stretta (compositore del preventivo, accanto all'anteprima) al
   massimo metà riga, così il nome resta a sinistra. */
html .jo-row:not(.is-text) > .fi-fo-component-ctn > div:has(> .jo-row-ctl) { flex: 0 0 min(var(--jo-row-ctl, 480px), 52%); width: min(var(--jo-row-ctl, 480px), 52%); }
/* Un interruttore da solo è largo quanto lui: il nome prende il resto della riga. */
html .jo-row:not(.is-text) > .fi-fo-component-ctn > div:has(> .jo-row-ctl .fi-fo-toggle):not(:has(> .jo-row-ctl .fi-input-wrp)) { flex: 0 0 auto; width: auto; }
/* Un campo breve (un importo, un numero di persone) largo come uno dei due campi
   di una riga divisa a metà, es. Cognome: nome e aiuto prendono il resto e stanno
   su una riga (Gabriele 19-nov-2026, Emetti voucher › Valore e Persone;
   FormRows::narrow). Al telefono resta a tutta riga, come gli altri. */
@media (min-width: 641px) {
    html .jo-row.is-narrow:not(.is-text) > .fi-fo-component-ctn > div:has(> .jo-row-ctl) { flex: 0 0 calc((min(var(--jo-row-ctl, 480px), 52%) - 8px) / 2); width: calc((min(var(--jo-row-ctl, 480px), 52%) - 8px) / 2); }
}
html .jo-row.is-text > .fi-fo-component-ctn { display: grid !important; gap: 6px !important; }
html .jo-row-head .fi-fo-placeholder { line-height: 1.35; }
html .jo-row-label { display: block; font-size: 14px; font-weight: 500; color: var(--ds-text-primary); }
html .jo-row-hint { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ds-text-tertiary); }
html .jo-row-req { margin-left: 1px; color: var(--ds-tone-danger-fg); font-weight: 600; }
/* Una nota o un errore sotto il campo («Non è nel database dell'hotel…», «Il
   campo è obbligatorio») allungano i valori: l'etichetta resta all'altezza del
   campo invece di scendere a metà del blocco (owner 16-nov-2026): la riga del
   suo testo con quella del campo; a capo, sopra il campo, non cambia niente. */
html .jo-row > .fi-fo-component-ctn:has(> div > .jo-row-ctl :is(.jo-rqc-new:not([style*="none"]), .fi-fo-field-wrp-error-message)) { align-items: baseline; }
/* Due campi della stessa riga allineati in alto (owner 16-nov-2026, Nome e
   Cognome): una nota sotto uno («Non è nel database dell'hotel…») non fa
   scendere l'altro a metà altezza. Un interruttore resta centrato. */
html .jo-row-ctl > .fi-fo-component-ctn { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: start; gap: 8px !important; }
html .jo-row-ctl .fi-fo-field-wrp { width: 100%; }
html .jo-row-ctl > .fi-fo-component-ctn > div:has(> .fi-fo-field-wrp .fi-fo-toggle) { justify-self: end; align-self: center; }
/* Un blocco col contenuto nascosto (la riga per creare un servizio, i parametri
   del motore) non lascia una riga vuota; un gruppo con tutte le righe chiuse
   non lascia il titoletto da solo. */
html .jo-rows > .fi-fo-component-ctn > div:has(> .jo-row):not(:has(> .jo-row > .fi-fo-component-ctn > :not(.hidden))) { display: none; }
/* Un testo col campo nascosto, un blocco col contenuto nascosto: niente riga. */
html .jo-rows > .fi-fo-component-ctn > div:has(> .jo-row.is-text:not(.is-block) > .fi-fo-component-ctn > div:nth-child(2).hidden) { display: none; }
html .jo-rows > .fi-fo-component-ctn > div:has(> .jo-row.is-block > .fi-fo-component-ctn > div:first-child.hidden) { display: none; }
/* Una riga coi campi tutti nascosti da una condizione non lascia il nome da solo. */
html .jo-rows > .fi-fo-component-ctn > div:has(> .jo-row .jo-row-ctl):not(:has(.jo-row-ctl > .fi-fo-component-ctn > :not(.hidden))) { display: none; }
html .fi-fo-component-ctn > div:has(> .jo-rows):not(:has(> .jo-rows > .fi-fo-component-ctn > :not(.hidden))) { display: none; }
/* Fino a tre scelte, pulsanti affiancati: riempiono la colonna dei valori, ognuno
   largo quanto il suo testo; se non ci sta va a capo, mai tagliato (owner 11-nov-2026). */
html .jo-row-ctl .fi-btn-group { display: grid !important; grid-auto-flow: column; grid-auto-columns: auto; width: 100%; }
html .jo-row-ctl .fi-btn-group > label,
html .jo-row-ctl .fi-btn-group > button,
html .jo-row-ctl .fi-btn-group > .fi-btn { justify-content: center; padding-inline: 8px; text-align: center; white-space: normal; line-height: 1.25; }
/* «Aggiungi» in fondo al gruppo, sopra una linea sottile. */
html .jo-rows > .fi-fo-component-ctn > div:not(.hidden):is(:has(> .jo-row .jo-row-ctl > .fi-fo-component-ctn > :not(.hidden)), :has(> .jo-row.is-text:not(.is-block) > .fi-fo-component-ctn > div:nth-child(2):not(.hidden)), :has(> .jo-row.is-block > .fi-fo-component-ctn > div:first-child:not(.hidden))) ~ div:not(.hidden) > .jo-rows-add { border-top: 1px solid var(--ds-border); }
html .jo-row.is-new::before, html .jo-row.is-leaving::before { opacity: 0; }
html .jo-rows .jo-rows-add { padding: 10px 0 8px; }
/* Due orari della stessa cosa: «14:00 – 10:30», il trattino al centro dello
   spazio fra i due, che si allarga per fargli posto (prima toccava il primo
   campo, owner 19-nov-2026, card «Campi dei form»). */
html .jo-row-ctl > .fi-fo-component-ctn:has(> div + div input[type="time"]) { column-gap: 22px !important; }
html .jo-row-ctl > .fi-fo-component-ctn > div:has(input[type="time"]) + div:has(input[type="time"]) { position: relative; }
html .jo-row-ctl > .fi-fo-component-ctn > div:has(input[type="time"]) + div:has(input[type="time"])::before { content: '–'; position: absolute; top: 19px; left: -11px; transform: translate(-50%, -50%); line-height: 1; color: var(--ds-text-tertiary); }
/* Il campo occupa tutta la sua larghezza (altre regole delle righe a segmenti lo dividevano). */
html .jo-row-ctl .fi-fo-field-wrp > .grid { grid-template-columns: minmax(0, 1fr) !important; }
html .jo-row-ctl .fi-fo-field-wrp > .grid > .grid { width: 100% !important; max-width: none !important; }
/* «Animali ammessi» con «escludi» accanto, sulla stessa riga. */
html .jo-row-ctl .jo-incl-row > .fi-fo-component-ctn { display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 12px !important; }
html .jo-row-ctl .jo-incl-row > .fi-fo-component-ctn > :first-child { flex: 1 1 auto; min-width: 0; }
html .jo-row-ctl .jo-incl-row > .fi-fo-component-ctn > :last-child { flex: 0 0 auto; }
html .jo-row-ctl .jo-incl-row .fi-fo-field-wrp.jo-incl-switch { width: auto; }
html .jo-rows-add > .fi-fo-component-ctn { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 12px !important; }
html .jo-rows-add-label { font-size: 13px; font-weight: 600; color: var(--ds-text-secondary); }
html .jo-rows-add .fi-ac { flex-wrap: wrap; gap: 8px !important; }
/* Ogni riga da aggiungere in un riquadro tratteggiato col «+», come «+ Nuovo». */
html .jo-rows-add .jo-rows-add-chip { padding: 5px 12px; border: 1px dashed var(--ds-border-strong); border-radius: 8px; background: var(--ds-surface); }
html .jo-rows-add .jo-rows-add-chip:hover { border-color: var(--ds-accent); background: var(--ds-accent-soft); text-decoration: none; }
/* La riga appena aperta da «Aggiungi» si accende un attimo. */
/* La ✕ di una riga facoltativa (owner 11-nov-2026): sempre subito dopo il nome,
   anche nei testi in più lingue (FormRows::labelWithRemove); al passaggio rossa.
   Preme l'azione vera, nascosta; senza di lei (creazione) non c'è. */
html .jo-row-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; vertical-align: -4px; border-radius: 6px; color: var(--ds-text-tertiary); }
html .jo-row-x svg { width: 14px; height: 14px; }
html .jo-row-x:hover { background: var(--ds-danger-bg, #FDECEC); color: var(--ds-danger-fg, #A11A1A); }
html .jo-row:not(:has(.jo-row-remove button)) .jo-row-x { display: none; }
/* Il nome di un testo in più lingue come quello delle altre righe. */
html .jo-row.is-text .fi-fo-field-wrp-label > span { font-size: 14px; font-weight: 500; color: var(--ds-text-primary); }
html .jo-row > .fi-fo-component-ctn > div:has(> .jo-row-remove) { display: none; }
/* Aperta da «Aggiungi»: un lampo lilla breve dentro la riga, che non esce dal
   gruppo e non copre i campi vicini; tolta con la ✕: sfuma più lenta, con una
   tinta rossa, prima di chiudersi (owner 11-nov-2026). Le righe sporgono di 8px
   nel margine del gruppo, così il lampo ha aria senza spostare niente. */
html .jo-rows .jo-row { margin-inline: -8px; padding-inline: 8px; border-radius: 8px; }
/* Il campo nascosto dei pulsanti a scelta (ToggleButtons) resta dentro la sua riga:
   senza, al clic prendeva il focus lontano e la pagina scattava (owner 11-nov-2026). */
html .jo-row, html .jo-row-ctl .fi-btn-group { position: relative; }
html .jo-row.is-new { animation: jo-row-in 1s ease-out; }
html .jo-row.is-leaving { animation: jo-row-out .55s ease-in forwards; pointer-events: none; }
@keyframes jo-row-in {
    0%, 35% { background: var(--ds-accent-soft); box-shadow: inset 0 0 0 1.5px var(--ds-accent); }
    100% { background: transparent; box-shadow: inset 0 0 0 1.5px transparent; }
}
@keyframes jo-row-out {
    0%, 45% { opacity: 1; background: var(--ds-danger-bg, #FDECEC); }
    100% { opacity: 0; background: var(--ds-danger-bg, #FDECEC); transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
    html .jo-row.is-new, html .jo-row.is-leaving { animation-duration: .01s; }
}
@media (max-width: 640px) {
    html .jo-rows { padding: 2px 12px 4px; }
    html .jo-row > .fi-fo-component-ctn { display: grid !important; gap: 6px !important; }
    html .jo-row:not(.is-text) > .fi-fo-component-ctn > div:has(> .jo-row-ctl) { width: 100%; }
    html .jo-row-ctl > .fi-fo-component-ctn > div:has(.fi-fo-toggle) { justify-self: start; }
}

/* «Apri link» solo con un link scritto (OpenUrlSuffix, owner 11-nov-2026): senza,
   sparisce anche il riquadro del suffisso. */
html .fi-input-wrp-suffix:has(.jo-open-url[style*="display: none"]):not(:has(:is(button, a):not(.jo-open-url):not([style*="display: none"]))) { display: none; }
/* Una tessera senza titolo che contiene solo righe (Stato hotel, Plafond
   email): il riquadro è quello delle righe, la tessera non ne aggiunge un altro. */
html body .jo-form-tile.jo-form-tile:has(> .fi-fo-component-ctn > div > .jo-rows):not(:has(> .fi-fo-component-ctn > div > :not(.jo-rows))) { padding: 0; border: 0; background: transparent; box-shadow: none; }

/* Una tessera fatta solo di righe (FormRows::titled, owner 11-nov-2026: «un
   contorno solo»): la cornice e la testata della tessera spariscono, il titolo
   sta sul filo del riquadro delle righe in alto a sinistra, come la legenda di
   un fieldset, e le azioni della testata a destra sullo stesso filo. */
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.jo-rows-titled:not(#jo-t1):not(#jo-t2):not(#jo-t3) { position: relative; margin-top: 10px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.jo-rows-titled:not(#jo-t1):not(#jo-t2):not(#jo-t3) > .fi-section-header { position: absolute !important; top: 0; right: 10px; left: 10px; z-index: 2; height: 0; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html body .jo-rows-titled > .fi-section-header > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(-50%); }
/* Le azioni che Filament ripete per il telefono (sm:hidden) stanno sul filo a destra anche lì. */
html body .jo-rows-titled > .fi-section-header > div:not(:first-child) { position: absolute; top: 0; right: 0; padding: 0 4px; background: var(--ds-surface); transform: translateY(-50%); }
html body .jo-rows-titled > .fi-section-header > div > .grid { flex: 0 1 auto; }
html body .jo-rows-titled > .fi-section-header .fi-section-header-heading { padding: 0 6px; background: var(--ds-surface); font-size: var(--ds-fs-h4) !important; font-weight: 600; line-height: 1.4; }
html body .jo-rows-titled > .fi-section-header .fi-section-header-description { display: none; }
html body .jo-rows-titled > .fi-section-header > div:first-child > :not(.grid) { padding: 0 4px; background: var(--ds-surface); }
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.jo-rows-titled:not(#jo-t1):not(#jo-t2):not(#jo-t3) > .fi-section-content-ctn { padding: 0 !important; border: 0 !important; background: transparent !important; }
html body .fi-section.fi-section.fi-section.fi-section.fi-section.fi-section.jo-rows-titled:not(#jo-t1):not(#jo-t2):not(#jo-t3) > .fi-section-content-ctn > .fi-section-content { padding: 0 !important; background: transparent !important; }
html body .jo-rows-titled > .fi-section-content-ctn > .fi-section-content > .fi-fo-component-ctn > div:not(.hidden) > .jo-rows:first-child { padding-top: 14px; }
/* Righe dentro un blocco di un altro gruppo di righe (Incasso: i campi del
   circuito scelto, che compaiono insieme): continuano lo stesso riquadro,
   senza un secondo contorno. */
html body .jo-rows .jo-row.is-text .jo-rows:not(.fi-fieldset) { margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; }
/* Una tessera che contiene un modulo a parte fatto di righe (Incasso, col suo
   Salva): il riquadro è quello delle righe, la tessera non ne aggiunge un altro. */
html body .jo-form-tile.jo-form-tile:has(> .fi-fo-component-ctn > div [wire\:id] .jo-rows) { padding: 0; border: 0; background: transparent; box-shadow: none; }
html body .jo-rows .jo-row.is-text:has(> .fi-fo-component-ctn > div > div > .jo-rows) { padding-block: 0; }
/* Una scritta che accompagna il campo («Consumi», col tooltip) sta accanto al
   nome: accanto al campo spostava gli interruttori fuori colonna. */
html .jo-row-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ds-text-tertiary); vertical-align: 1px; cursor: help; }
html .jo-row-tag > svg { width: 14px; height: 14px; }
html .jo-row-tag.is-warning { color: var(--ds-warn-fg); }
html .jo-row-tag.is-danger { color: var(--ds-tone-danger-fg); }
/* Una lista di interruttori (Link utili › Link attivi, owner 11-nov-2026:
   «decisamente più stretto»): ogni voce è una riga bassa, il nome e la
   descrizione sulla stessa riga (coi puntini, intera nel tooltip del
   browser), l'interruttore a destra, un filo fra una riga e l'altra; fino a
   tre colonne. */
html .fi-fo-checkbox-list.jo-switch-list { display: grid !important; grid-template-columns: minmax(0, 1fr); columns: auto !important; gap: 0 28px !important; margin: 0 !important; }
html .fi-fo-checkbox-list.jo-switch-list > * { margin: 0 !important; padding: 0 !important; break-inside: auto; }
html .jo-switch-list .fi-fo-checkbox-list-option-label.flex { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--ds-border); }
html .fi-fo-checkbox-list.jo-switch-list > :first-child .fi-fo-checkbox-list-option-label.flex { border-top: 0; }
html .jo-switch-list .fi-fo-checkbox-list-option-label.flex > .grid { display: flex !important; align-items: baseline; gap: 6px; min-width: 0; line-height: 20px; }
/* Il nome si accorcia coi puntini solo dopo la descrizione (joorna-api-08, 11-nov-2026: un nome lungo finiva sotto l'interruttore). */
html .jo-switch-list .fi-fo-checkbox-list-option-label.flex > .grid > span { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html .jo-switch-list input.jo-switch[type="checkbox"] { flex: none; margin: 0 !important; }
html .jo-switch-list .fi-fo-checkbox-list-option-description { flex: 0 1000 auto; min-width: 0; overflow: hidden; font-size: 12.5px; color: var(--ds-text-tertiary); white-space: nowrap; text-overflow: ellipsis; }
/* Le colonne seguono lo spazio del campo, non lo schermo: nel compositore del
   preventivo (colonna stretta accanto all'anteprima) due, nella pagina intera tre. */
html .fi-fo-field-wrp:has(.fi-fo-checkbox-list.jo-switch-list) { container-type: inline-size; }
@container (min-width: 520px) {
    html .fi-fo-checkbox-list.jo-switch-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html .fi-fo-checkbox-list.jo-switch-list > :nth-child(2) .fi-fo-checkbox-list-option-label.flex { border-top: 0; }
}
@container (min-width: 860px) {
    html .fi-fo-checkbox-list.jo-switch-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    html .fi-fo-checkbox-list.jo-switch-list > :nth-child(3) .fi-fo-checkbox-list-option-label.flex { border-top: 0; }
}
/* A due righe (jo-switch-list--stack): il nome sopra, sotto la descrizione intera
   con un eventuale avviso (Informazioni aggiuntive del preventivo). */
html .jo-switch-list--stack .fi-fo-checkbox-list-option-label.flex { align-items: flex-start; padding: 8px 0; }
html .jo-switch-list--stack .fi-fo-checkbox-list-option-label.flex > .grid { display: grid !important; gap: 1px; }
html .jo-switch-list--stack .fi-fo-checkbox-list-option-description { overflow: visible; white-space: normal; }
html .jo-switch-list--stack input.jo-switch[type="checkbox"] { margin-top: 1px !important; }
/* Configurazione canali › Canali: lo stato col pallino e la matita nella
   colonna dei valori, il testo lungo coi puntini. */
html .jo-chan-value { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
html .jo-chan-state { min-width: 0; overflow: hidden; font-size: 13px; color: var(--ds-text-secondary); white-space: nowrap; text-overflow: ellipsis; }
/* Un contatore − n + in una riga riempie la colonna dei valori come gli altri
   campi (owner 11-nov-2026: a destra e corto «disallineato»). */
html .jo-row-ctl .jo-counter, html .jo-row-ctl .jo-counter .fi-input-wrp { width: 100%; max-width: none; }
/* La descrizione di una tessera col titolo sul filo: la prima riga, tenue. */
html .jo-rows-note { font-size: 12.5px; line-height: 1.45; color: var(--ds-text-tertiary); }
/* Un gruppo fatto solo di interruttori (Notifiche del preventivo, Collegamenti
   pubblicitari, Prenotazione in chat) va su due colonne dove c'è spazio, come i
   Moduli e i Link attivi: niente vuoto fra il nome e l'interruttore (owner
   11-nov-2026, «si può restringere»). Sul telefono e nelle colonne strette una. */
html .fi-fo-component-ctn > div:has(> .jo-rows) { container-type: inline-size; }
@container (min-width: 520px) {
    html .jo-rows:has(.jo-row-ctl .fi-fo-toggle):not(:has(.jo-row-ctl .fi-input-wrp, .jo-row-ctl .fi-btn-group, .jo-row.is-text, .jo-rows-add)) > .fi-fo-component-ctn { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px !important; }
    html .jo-rows:has(.jo-row-ctl .fi-fo-toggle):not(:has(.jo-row-ctl .fi-input-wrp, .jo-row-ctl .fi-btn-group, .jo-row.is-text, .jo-rows-add)) > .fi-fo-component-ctn > div:nth-child(2) > .jo-row::before { display: none; }
}
/* Un testo a riga intera: le sue icone (Inserisci un dato, Scrivi con AI,
   Traduci) stanno sulla riga del nome, a destra, non su una riga a parte
   (owner 11-nov-2026). */
html .jo-rows .jo-row.is-text { position: relative; }
html .jo-rows .jo-row.is-text:not(.is-block) .fi-fo-field-wrp-hint { position: absolute; top: 8px; right: 8px; }
/* Sul telefono, con più icone (Inserisci un dato, Scrivi con AI, Genera con AI) in alto a destra
   coprivano il nome («Testo del messaggio» del modello WhatsApp, 17-nov-2026): lì restano sopra il campo. */
@media (max-width: 639px) {
    html .jo-rows .jo-row.is-text:not(.is-block) .fi-fo-field-wrp-hint { position: static; }
}
/* A due righe (nome e frase, con un avviso) una sola colonna: con altezze
   diverse le colonne non stavano allineate (owner 11-nov-2026). */
html .fi-fo-checkbox-list.jo-switch-list.jo-switch-list--stack { grid-template-columns: minmax(0, 1fr) !important; }
html .fi-fo-checkbox-list.jo-switch-list.jo-switch-list--stack > :not(:first-child) .fi-fo-checkbox-list-option-label.flex { border-top: 1px solid var(--ds-border) !important; }
/* Una riga che contiene una parte nascosta dal browser (x-show: la strada non
   scelta di «Da dove parti») non lascia una riga vuota col suo filo. */
html .jo-rows > .fi-fo-component-ctn > div:has(> .jo-row.is-block > .fi-fo-component-ctn > div > [style*="display: none"]) { display: none; }

/* Il passo aperto dalla matita di una scheda (owner 12-nov-2026, EditsByTile::$modifica):
   il contorno viola dice «è qui che stai modificando». */
html body .fi-section.jo-step-target { outline: 2px solid var(--ds-accent) !important; outline-offset: 0; scroll-margin-top: 96px; animation: jo-step-target-in 0.9s ease-out 3; }
/* All'arrivo il contorno pulsa tre volte poi resta (owner 12-nov-2026, «magari con un'animazione»). */
@keyframes jo-step-target-in {
    0% { outline-offset: 0; }
    50% { outline-offset: 7px; }
    100% { outline-offset: 0; }
}
/* Una parte dentro la card: il contorno attorno alla parte, un po' staccato. */
html body .fi-section .fi-section.jo-step-target { outline-offset: 10px; border-radius: 10px; animation: none; }
@media (prefers-reduced-motion: reduce) { html body .fi-section.jo-step-target { animation: none !important; } }

/* Indirizzi che si compilano da soli (AddressAutofill, owner 19-nov-2026):
   sotto il nome del campo la domanda e le scelte, una per comune, un clic. */
html .jo-suggest { display: inline; color: var(--ds-text-secondary); }
html .jo-suggest-pick {
    display: inline-flex; align-items: center; margin: 4px 6px 0 0; padding: 2px 10px;
    border: 1px solid var(--ds-accent-soft-2); border-radius: var(--ds-radius-pill);
    background: var(--ds-accent-soft); color: var(--ds-text-link); font-size: 12.5px; font-weight: 500;
    transition: background-color var(--ds-motion-fast) var(--ds-ease-out);
}
html .jo-suggest-pick:hover { background: var(--ds-accent-soft-hover); }
html .jo-suggest-pick:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 1px; }

/* Campi con suggerimenti (datalist, ui-standard.js, owner 19-nov-2026): la
   tendina sotto il campo, disegnata come quelle delle Select (Choices). */
html .jo-dl-host { position: relative; }
html .jo-dl-panel {
    position: absolute; z-index: 20;
    margin-top: 8px; padding: 4px; max-height: 240px; overflow-y: auto;
    border-radius: var(--ds-radius-control, 8px); background: var(--ds-surface);
    box-shadow: 0 0 0 1px var(--ds-border), var(--ds-shadow-raised);
    font-size: 14px; line-height: 20px; text-align: left;
    animation: jo-motion-fade var(--ds-motion-fast) var(--ds-ease-out);
}
html .jo-dl-item { padding: 8px; border-radius: 6px; color: var(--ds-text-primary); cursor: pointer; }
html .jo-dl-item.is-active { background: var(--ds-surface-hover); }

/* La casella di ricerca dentro le tendine: il segnaposto del colore di tutti
   gli altri (era il grigio chiaro di Filament, owner 19-nov-2026). */
html .choices__input::placeholder { color: var(--ds-text-placeholder); opacity: 1; }
