/* Standard UX/UI Joorna — regole comuni alle pagine ridisegnate.
 *
 * Valgono solo dove la pagina mette `jo-std` sul body (trait
 * App\Filament\Concerns\UsesJoornaStandard): Schede hotel, Connessioni e le
 * prossime sezioni. Stessi token della Dashboard Generale: bordo sottile,
 * raggio 14px, testi secondari dai token, tessere colorate per le icone.
 *
 * CSS a mano come gli altri file di public/css: deploy PHP-only, nei blade
 * valgono solo le classi già compilate da Filament.
 */

:root {
    /* Livello locale: tutto dai token --ds-* (joorna-tokens.css), che
     * cambiano da soli in dark. */
    --jo-ui-ink: var(--ds-text-primary);
    --jo-ui-muted: var(--ds-text-tertiary);
    --jo-ui-line: var(--ds-border);
    --jo-ui-line-2: var(--ds-row-divider);
    --jo-ui-surface: var(--ds-surface);
    --jo-ui-soft: var(--ds-surface-sunken);
    --jo-ui-accent: var(--ds-accent);
    --jo-ui-accent-soft: var(--ds-accent-soft);
    --jo-ui-radius: var(--ds-radius-card); /* 16, la scala unica (owner 11-nov-2026; prima 14) */
    --jo-ui-ok: var(--ds-ok-fg);
    --jo-ui-ok-bg: var(--ds-ok-bg);
    --jo-ui-warn: var(--ds-warn-fg);
    --jo-ui-warn-bg: var(--ds-warn-bg);
    --jo-ui-danger: var(--ds-err-fg);
    --jo-ui-danger-bg: var(--ds-err-bg);
    --jo-ui-info: var(--ds-info-fg);
    --jo-ui-info-bg: var(--ds-info-bg);
}

/* Descrizione breve sotto il titolo: il posto dell'info point. */
.jo-page-desc {
    display: block;
    max-width: 48rem;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--jo-ui-muted);
}

/* ── Tabelle: su TUTTE le tabelle della piattaforma (standard permanente) ── */

.fi-ta-ctn {
    border-radius: var(--jo-ui-radius);
    box-shadow: var(--ds-shadow-rest);
    outline: 1px solid var(--jo-ui-line);
    --tw-ring-color: transparent;
}

.fi-ta-header-cell {
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--jo-ui-soft);
}

.fi-ta-header-cell-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--jo-ui-muted);
}

.fi-ta-text-item,
.fi-ta-text {
    font-size: 13.5px;
}

.fi-ta-text-item-label {
    line-height: 1.35;
}

/* Righe più basse: il padding verticale di Filament sta sul contenuto
 * della cella (py-4), non sul suo contenitore. */
.fi-ta-cell .fi-ta-text,
.fi-ta-cell .fi-ta-icon,
.fi-ta-cell > .py-4 {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* In Lista appena più ariose: 2px in più sopra e sotto, righe da 53px invece
 * di 49 (owner 9-nov-2026). Le Card tengono le loro misure. */
.fi-ta:not(.jo-ta-cards) .fi-ta-cell .fi-ta-text,
.fi-ta:not(.jo-ta-cards) .fi-ta-cell .fi-ta-icon,
.fi-ta:not(.jo-ta-cards) .fi-ta-cell > .py-4 {
    padding-top: 12px;
    padding-bottom: 12px;
}

.fi-ta-filters-above-content-ctn {
    padding-top: 14px;
    padding-bottom: 6px;
}

/* ── Sezioni dei form ─────────────────────────────────────── */

.jo-std .fi-section {
    border-radius: var(--jo-ui-radius);
}

.jo-std .fi-section-header-heading {
    font-size: var(--ds-fs-h3);
}

.jo-std .fi-section-header-description {
    font-size: 13px;
}

/* ── Filtri rapidi (standard, 28-set) ─────────────────────────
 * Pill compatte con conteggio sopra il contenuto: Tutti · Attivi · …
 * Valgono per le schede delle liste (getTabs, override
 * vendor/filament-panels/components/resources/tabs) e per le pagine custom
 * (<x-jo.quick-filters>). Solo per filtri dello STESSO insieme di dati: la
 * navigazione fra sezioni diverse resta a schede. */

.fi-tabs.jo-qf {
    gap: 6px;
    margin-inline: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    --tw-ring-color: transparent;
}

.jo-qf .fi-tabs-item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 13px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 999px;
    background: var(--jo-ui-surface);
    font-size: 12.5px;
    white-space: nowrap;
    cursor: pointer;
}

.jo-qf .fi-tabs-item:hover {
    background: var(--jo-ui-soft);
}

.jo-qf .fi-tabs-item-label {
    font-weight: 600;
    color: var(--jo-ui-muted);
}

.jo-qf .fi-tabs-item-icon {
    width: 15px;
    height: 15px;
    color: var(--jo-ui-muted);
}

.jo-qf .fi-tabs-item.fi-active {
    border-color: color-mix(in srgb, var(--jo-ui-accent) 35%, transparent);
    background: var(--jo-ui-accent-soft);
}

.jo-qf .fi-tabs-item.fi-active .fi-tabs-item-label,
.jo-qf .fi-tabs-item.fi-active .fi-tabs-item-icon {
    color: var(--jo-ui-accent);
}

.jo-qf .fi-badge {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--jo-ui-soft);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: var(--jo-ui-muted);
    --tw-ring-color: transparent;
}

.jo-qf .fi-tabs-item.fi-active .fi-badge {
    background: var(--jo-ui-accent);
    color: #fff;
}

/* ── KPI compatti (stesso disegno della Dashboard Generale) ── */

.jo-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .jo-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .jo-kpis {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.jo-kpi {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--jo-ui-line);
    border-radius: var(--jo-ui-radius);
    background: var(--jo-ui-surface);
    box-shadow: var(--ds-shadow-rest);
}

.jo-kpi-top {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

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

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

.jo-kpi-ic.t-ok { background: var(--jo-ui-ok-bg); color: var(--jo-ui-ok); }
.jo-kpi-ic.t-warn { background: var(--jo-ui-warn-bg); color: var(--jo-ui-warn); }
.jo-kpi-ic.t-danger { background: var(--jo-ui-danger-bg); color: var(--jo-ui-danger); }
.jo-kpi-ic.t-info { background: var(--jo-ui-info-bg); color: var(--jo-ui-info); }

.jo-kpi-lbl {
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--jo-ui-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jo-kpi-val {
    margin-top: 8px;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--jo-ui-ink);
}

.jo-kpi-val.is-danger { color: var(--jo-ui-danger); }
.jo-kpi-val.is-warn { color: var(--jo-ui-warn); }

/* ── Card informative e fatti ─────────────────────────────── */

.jo-panel {
    min-width: 0;
    padding: 16px 20px;
    border: 1px solid var(--jo-ui-line);
    border-radius: var(--jo-ui-radius);
    background: var(--jo-ui-surface);
    box-shadow: var(--ds-shadow-rest);
    color: var(--jo-ui-ink);
    font-size: 14px;
}

.jo-panel h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.jo-panel-hint {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--jo-ui-muted);
}

.jo-panel-body {
    margin-top: 14px;
}

/* Tabelle dati semplici dentro una card (non tabelle Filament): una sola
 * versione per tutta la piattaforma (Chatbot, Preventivatore ▸ Numeri,
 * Analytics ▸ Email). .num = numero a destra; tr.is-none attenuata;
 * tr.is-on evidenziata; .is-warn / .is-ok colorano il valore. */
.jo-mtable-wrap { max-width: 100%; overflow-x: auto; }

.jo-mtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: var(--jo-ui-ink);
}

.jo-mtable th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--jo-ui-line);
    font-size: 12px;
    font-weight: 600;
    color: var(--jo-ui-muted);
    text-align: left;
    white-space: nowrap;
}

.jo-mtable td { padding: 8px 10px; border-bottom: 1px solid var(--jo-ui-line-2); }
.jo-mtable tr:last-child td { border-bottom: 0; }
.jo-mtable th:first-child,
.jo-mtable td:first-child { padding-left: 0; }
.jo-mtable th:last-child,
.jo-mtable td:last-child { padding-right: 0; }
.jo-mtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jo-mtable tr.is-none td { color: var(--jo-ui-muted); }
.jo-mtable tr.is-on td { background: var(--jo-ui-accent-soft); font-weight: 600; } /* il primo in classifica: fondo tenue, testo normale (non sembra un link) */
.jo-mtable .is-warn { color: var(--jo-ui-warn); }
.jo-mtable .is-ok { color: var(--jo-ui-ok); }

.jo-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.jo-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0;
    margin: 0;
    border: 1px solid var(--jo-ui-line);
    border-radius: 12px;
    overflow: hidden;
}

.jo-facts > div {
    padding: 10px 14px;
    border-right: 1px solid var(--jo-ui-line);
    min-width: 0;
}

.jo-facts > div:last-child {
    border-right: 0;
}

.jo-facts dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-facts dd {
    margin: 3px 0 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.jo-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: jo-step;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
    color: var(--jo-ui-muted);
}

.jo-steps li {
    position: relative;
    padding-left: 30px;
}

.jo-steps li::before {
    counter-increment: jo-step;
    content: counter(jo-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jo-steps strong {
    color: var(--jo-ui-ink);
}

/* ── Filtri nell'header delle colonne (ColumnFilters) ─────── */

.jo-colh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jo-colf {
    display: inline-flex;
}

.jo-colf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    color: var(--jo-ui-muted);
    opacity: 0.55;
    cursor: pointer;
}

.fi-ta-header-cell:hover .jo-colf-btn,
.jo-colf-btn:focus-visible {
    opacity: 1;
}

.jo-colf-btn:hover {
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
    opacity: 1;
}

.jo-colf-btn.is-active {
    opacity: 1;
    color: var(--jo-ui-accent);
    background: var(--jo-ui-accent-soft);
}

.jo-colf-btn svg {
    width: 13px;
    height: 13px;
}

.jo-colf-panel {
    position: fixed;
    z-index: 60;
    width: 264px;
    max-height: 340px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 12px;
    background: var(--jo-ui-surface);
    box-shadow: var(--ds-shadow-raised);
    color: var(--jo-ui-ink);
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}

.jo-colf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-colf-reset {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--jo-ui-accent);
}

.jo-colf-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jo-colf-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 7px;
    cursor: pointer;
}

.jo-colf-option:hover {
    background: var(--jo-ui-soft);
}

.jo-colf-option input {
    accent-color: var(--jo-ui-accent);
}

.jo-colf-input {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 8px;
    background: var(--jo-ui-surface);
    color: var(--jo-ui-ink);
    font-size: 13px;
}

.jo-colf-input:focus {
    outline: 2px solid var(--jo-ui-accent-soft);
    border-color: var(--jo-ui-accent);
}

.jo-colf-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.jo-colf-range .jo-colf-input:first-child {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}

.jo-colf-range .jo-colf-input:last-child {
    margin-inline-start: -1px;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

.jo-colf-range .jo-colf-input:focus {
    position: relative;
    z-index: 1;
}

/* ── Colonne riordinabili e ridimensionabili (table-columns.js) ── */

.jo-col-th {
    position: relative;
    cursor: grab;
}

.jo-col-th.jo-col-dragging {
    opacity: 0.5;
}

.jo-col-th.jo-col-over {
    box-shadow: inset 2px 0 0 var(--jo-ui-accent);
}

/* Maniglia del bordo (owner 22-ott-2026): 12px dentro la colonna, attaccati al
 * bordo (sporgendo li copriva l'intestazione accanto, ferma e sopra, e il clic
 * spostava la colonna invece di allargarla); passando sulla riga dei titoli si
 * vedono tutti i divisori, quello sotto il mouse e quello trascinato in viola. */
.jo-col-grip {
    position: absolute;
    z-index: 2;
    top: 0.35rem;
    bottom: 0.35rem;
    right: 0;
    width: 12px;
    cursor: col-resize;
}

.jo-col-grip::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 2px;
    border-radius: 2px;
    background: transparent;
    transition: background .12s;
}

.fi-ta-table thead:hover .jo-col-grip::after {
    background: var(--ds-border-strong, #C9CDD8);
}

.jo-col-grip:hover::after,
.jo-col-th.is-resizing .jo-col-grip::after {
    background: var(--ds-accent, #7145D9);
}

.jo-col-th.is-resizing {
    box-shadow: inset -2px 0 0 var(--ds-accent, #7145D9);
}

/* L'ultima colonna ridimensionabile confina con Azioni: niente maniglia. */
.fi-ta-table thead th.jo-col-th:not(:has(~ th.jo-col-th)) .jo-col-grip {
    display: none;
}

.jo-col-resizing,
.jo-col-resizing a,
.jo-col-resizing button,
.jo-col-resizing input,
.jo-col-resizing select,
.jo-col-resizing textarea,
.jo-col-resizing label,
.jo-col-resizing summary,
.jo-col-resizing [role],
.jo-col-resizing [tabindex],
.jo-col-resizing [draggable],
.jo-col-resizing [class*="cursor-"],
.jo-col-resizing .fi-ta-row,
.jo-col-resizing tr,
.jo-col-resizing th,
.jo-col-resizing td,
.jo-col-resizing svg {
    cursor: col-resize !important;
    user-select: none;
}

.jo-cols-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--jo-ui-muted);
}

.jo-cols-reset[hidden] {
    display: none;
}

.jo-cols-reset:hover {
    background: var(--jo-ui-soft);
    color: var(--jo-ui-accent);
}

.jo-cols-reset svg {
    width: 18px;
    height: 18px;
}

/* ── Barra tabella: Lista/Card e legenda (HasListCardLayout) ── */

.jo-hl-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.jo-seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 10px;
    background: var(--jo-ui-surface);
}

.jo-seg button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    /* 28 + 3+3 di padding + 1+1 di bordo = 36: alto come ricerca e pulsanti. */
    height: 28px;
    border-radius: 7px;
    color: var(--jo-ui-muted);
}

.jo-seg button:hover {
    color: var(--jo-ui-ink);
}

.jo-seg button[aria-pressed='true'] {
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
}

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

.jo-legend {
    padding: 10px 12px;
    font-size: 13px;
}

.jo-legend-title {
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.jo-legend-note {
    margin-top: 4px;
    padding-top: 7px;
    border-top: 1px solid var(--jo-ui-line-2);
    color: var(--jo-ui-muted);
    font-size: 12px;
}

/* ── Moduli a icone ───────────────────────────────────────── */

.jo-mods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.jo-mod {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
    font-size: 11px;
    font-weight: 600;
}

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

.jo-dash {
    font-size: 13px;
    color: var(--jo-ui-muted);
}

/* Tutti i filtri sono nelle intestazioni: il pulsante imbuto della barra no. */
.fi-ta .jo-filters-trigger-off,
.fi-dropdown:has(> .fi-dropdown-trigger .jo-filters-trigger-off) {
    display: none !important;
}

/* ── Card dei cataloghi (Servizi struttura, Catalogo CTA) ── */

.jo-cat-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
}

.jo-cat-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-cat-group-title span {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--jo-ui-soft);
    font-weight: 600;
}

.jo-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 10px;
}

.jo-cat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 12px;
    background: var(--jo-ui-surface);
    color: var(--jo-ui-ink);
    text-align: left;
    transition: border-color 0.15s;
}

.jo-cat-card:hover {
    border-color: var(--jo-ui-accent);
}

.jo-cat-card-name {
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-cat-card-meta {
    font-size: 12px;
    color: var(--jo-ui-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-cat-empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: var(--jo-ui-muted);
}

/* ── Modelli ▸ Marketing e automazioni: eventi in card ───── */

.jo-ev-card {
    gap: 8px;
}

.jo-ev-card-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.jo-ev-icon {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
}

.jo-ev-icon svg {
    width: 17px;
    height: 17px;
}

.jo-ev-icon--success { background: var(--jo-ui-ok-bg); color: var(--jo-ui-ok); }
.jo-ev-icon--warning { background: var(--jo-ui-warn-bg); color: var(--jo-ui-warn); }
.jo-ev-icon--info { background: var(--jo-ui-info-bg); color: var(--jo-ui-info); }

.jo-ev-card-desc {
    flex: 1;
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--jo-ui-muted);
}

/* ── Modelli: card con anteprima (Grafica voucher, Email) ── */

.jo-tpl-grid {
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

/* Card compatte (owner 5-nov-2026: «la card può essere dimezzata»): la
   miniatura mostra solo la testa dell'email (oggetto, saluto, testo, pulsante),
   che basta a riconoscerla; sotto il resto era bianco. */
.jo-tpl-card {
    gap: 4px;
    padding: 10px 12px;
}

.jo-tpl-card .jo-cat-card-name {
    margin-top: 4px;
    font-size: 14px;
    line-height: 20px;
}

.jo-tpl-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 112px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--jo-ui-soft);
}

.jo-tpl-thumb[href] {
    cursor: pointer;
}

.jo-tpl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Anteprima dal vivo (nessun PNG): l'email rimpicciolita per stare tutta
   nella larghezza della card (owner 28-ott-2026: a scala fissa da 600px i
   lati restavano tagliati). Il riquadro è largo la card diviso la scala:
   in una card da 180px l'email esce a 600px, più larga resta centrata. */
.jo-tpl-thumb-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% / .3);
    height: calc(100% / .3);
    border: 0;
    transform: scale(.3);
    transform-origin: top left;
    pointer-events: none;
    background: #ffffff; /* l'email vera è bianca */
}

/* Lingue di un modello email (card 1amdj41fjqk): sigle piccole in fila.
   Lingua presente in verde tenue (come "Attivo"), lingua mancante in ambra
   tenue tratteggiata con il "+" (come "da fare": apre "Traduci"; mai rosso,
   non è un errore). Originale in grassetto, versione aperta e corrispondenza
   della ricerca in viola tenue. */
.jo-lang-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

/* Nella colonna Lingue della Lista, sopra le sigle. */
.jo-lang-hint {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
    color: var(--ds-text-tertiary);
}

.jo-lang-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid var(--ds-ok-bd);
    border-radius: 6px;
    background: var(--ds-ok-bg);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 18px;
    color: var(--ds-ok-fg);
    text-decoration: none;
}

.jo-lang-chip.is-source {
    font-weight: 800;
}

/* La lingua di una persona (Ospiti, Lead): etichetta neutra come gli altri
   attributi (.jo-cell-tag), non il verde di «la traduzione c'è» (owner 18-nov-2026). */
.jo-lang-chip.is-neutral {
    border-color: var(--ds-border);
    background: transparent;
    color: var(--ds-text-secondary);
}

.jo-lang-chip.is-missing {
    border: 1px dashed var(--ds-warn-dot);
    background: var(--ds-warn-bg);
    font-weight: 600;
    color: var(--ds-warn-fg);
}

a.jo-lang-chip:hover,
.jo-lang-chip.is-current,
.jo-lang-chip.is-match {
    border-color: var(--ds-accent);
    border-style: solid;
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
}

.jo-tpl-meta {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ds-text-tertiary, #5B5B6B);
}

.jo-tpl-thumb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    color: var(--jo-ui-muted);
}

.jo-tpl-thumb-empty svg {
    width: 26px;
    height: 26px;
    opacity: 0.6;
}

.jo-tpl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 22px;
}

.jo-tpl-actions {
    width: 100%;
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid var(--jo-ui-line-2);
}

/* ══ Standard tabelle, globale (tutte le tabelle) ══════════════ */

/* Dogma: stato con icona = solo icona (il testo è nel tooltip). */
/* "Azzera filtri": sempre nello stesso punto, spento se non c'è niente da togliere. */
.jo-filters-reset {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--jo-ui-accent);
}

.jo-filters-reset:hover:not(:disabled) {
    background: var(--jo-ui-soft);
}

.jo-filters-reset:disabled {
    color: var(--jo-ui-muted);
    opacity: 0.45;
    cursor: default;
}

.jo-filters-reset > svg {
    width: 18px;
    height: 18px;
}

.jo-filters-reset-x {
    position: absolute;
    right: 3px;
    bottom: 3px;
    display: inline-flex;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--jo-ui-surface);
}

.jo-filters-reset-x svg {
    width: 11px;
    height: 11px;
}

/* ── Vista Card generica (public/js/table-columns.js) ── */

.jo-ta-cards .fi-ta-content {
    overflow: visible;
}

.jo-ta-cards table.fi-ta-table,
.jo-ta-cards table.fi-ta-table > tbody {
    display: block;
    width: 100%;
}

/* Niente intestazioni in Card: filtri di colonna e ordinamento stanno
   solo nella Lista (i filtri attivi restano applicati, "Azzera filtri"
   resta nella barra). */
.jo-ta-cards table.fi-ta-table > thead {
    display: none;
}

.jo-ta-cards table.fi-ta-table > tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 10px;
    padding: 14px;
}

.jo-ta-cards table.fi-ta-table > tbody > tr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    /* Fisso: la testata lilla arriva ai bordi con -10px -12px; un'altra
       imbottitura la faceva sporgere (22-ott-2026). */
    padding: 10px 12px !important;
    border: 1px solid var(--jo-ui-line);
    /* Il divisore delle righe di Filament (divide-y) toglieva il bordo di sotto
       dalla seconda card in poi: card "tagliate" (owner 9-ott-2026). */
    border-width: 1px !important;
    border-radius: 12px;
    background: var(--jo-ui-surface);
}

.jo-ta-cards table.fi-ta-table > tbody > tr:hover {
    border-color: var(--jo-ui-accent);
}

/* Righe di gruppo: tutta la larghezza, come titolo di sezione. */
.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td[colspan]) {
    grid-column: 1 / -1;
    padding: 4px 2px;
    border: 0;
    background: none;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 0 !important;
    border: 0;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td > * {
    min-width: 0;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp > *,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-icon {
    padding: 2px 0 !important;
}

/* Nella card ogni valore parte a sinistra, sulla linea della sua etichetta:
   l'allineamento delle colonne (alignCenter, alignEnd, alignRight…) vale solo
   nella Lista (segnalazione T1, 29-ott-2026: icone di Provenienza al centro,
   numeri dei pop-up attaccati al bordo). Tutte le classi che Filament mette
   per l'allineamento, anche sugli elenchi a righe (ul.items-*, non l'icona
   accanto al testo); la cella Azioni non ha .fi-ta-col-wrp e resta a destra. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .justify-center,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .justify-end,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .justify-between {
    justify-content: flex-start !important;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp ul.items-center,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp ul.items-end {
    align-items: flex-start !important;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .text-center,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .text-end,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .text-right,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-col-wrp .text-justify {
    text-align: start !important;
}

/* Etichetta su due righe al massimo, intera invece che coi puntini (T1,
   «Voucher collegato»): è disegnata dal CSS, un tooltip non ci si aggancia. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]::before {
    content: attr(data-jo-label);
    flex: 0 0 38%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    white-space: normal;
    font-size: 12px;
    /* Etichette in grassetto (cliente 29-ott-2026: "card troppo piatte"). */
    font-weight: 600;
    color: var(--jo-ui-muted);
}

/* Icone alla stessa altezza del testo delle altre righe: il riquadro è alto
   quanto una riga di testo e l'icona ci sta al centro. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-icon {
    min-height: 24px;
    align-items: center;
}

/* Un'icona non ha una linea di base e l'etichetta, allineata a quella, scendeva:
   un carattere invisibile alto una riga di testo gliela dà, come alle altre righe. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-icon::before {
    content: '\200B';
    margin-inline-end: -0.375rem; /* annulla lo spazio fra gli elementi (gap-1.5) */
    font-size: 14px;
    line-height: 24px;
}

/* La prima colonna è il titolo della card: senza etichetta, in evidenza. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type::before,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label]::before {
    display: none;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label] {
    margin-bottom: 4px;
    font-weight: 600;
}

/* L'icona della sezione accanto al titolo (owner 9-ott-2026: card meno
   asettiche): tessera lilla tenue, icona in viola pastello (--jo-card-icon,
   e --jo-card-tile dalla barra della tabella, TableStandard::cardIconCss,
   solo dove la pagina ha un'icona). Solo CSS. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label] {
    align-items: center;
    gap: 10px;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type::after,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label]::after {
    /* Senza icona (--jo-card-tile non impostata) la tessera è larga zero. */
    content: '';
    order: -1;
    flex: 0 0 var(--jo-card-tile, 0px);
    height: var(--jo-card-tile, 0px);
    border-radius: 8px;
    background: var(--ds-accent-soft, #F3EEFC) var(--jo-card-icon, none) center / 17px no-repeat;
}

/* Testata della card lilla tenue (owner 9-ott-2026: "card ancora troppo
   bianche"): icona e titolo su fondo lilla chiarissimo fino ai bordi della
   card, un filetto sotto; il resto resta chiaro. Solo la vista Card. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label] {
    width: calc(100% + 24px) !important;
    max-width: none !important;
    margin: -10px -12px 6px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--ds-card-head-bd, #E4DBF6);
    border-radius: 11px 11px 0 0;
    background: var(--ds-card-head-bg, #F5F1FC);
}

/* Owner 8-ott-2026: niente testo che esce dalla card. Le celle restano
   larghe quanto la card (la larghezza delle colonne della Lista non vale qui),
   i testi lunghi vanno a capo e le righe secondarie (email sotto il nome)
   finiscono con i puntini. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td {
    width: auto !important;
    max-width: 100% !important;
    overflow: hidden;
}
.jo-ta-cards table.fi-ta-table > tbody > tr > td > * { flex: 1 1 0; }
.jo-ta-cards table.fi-ta-table > tbody > tr > td div, .jo-ta-cards table.fi-ta-table > tbody > tr > td span, .jo-ta-cards table.fi-ta-table > tbody > tr > td p, .jo-ta-cards table.fi-ta-table > tbody > tr > td a, .jo-ta-cards table.fi-ta-table > tbody > tr > td time, .jo-ta-cards table.fi-ta-table > tbody > tr > td img, .jo-ta-cards table.fi-ta-table > tbody > tr > td button, .jo-ta-cards table.fi-ta-table > tbody > tr > td label, .jo-ta-cards table.fi-ta-table > tbody > tr > td ul, .jo-ta-cards table.fi-ta-table > tbody > tr > td li { min-width: 0 !important; max-width: 100%; }
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text-item,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text-item-label,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .truncate:not(p) { white-space: normal; overflow-wrap: anywhere; }

/* Testi lunghi in Card, la regola per tutte le colonne (segnalazione T5,
   29-ott-2026: i testi dei modelli WhatsApp andavano a capo per intero):
   al massimo 3 righe coi puntini, il titolo della card 2. Il testo intero sta
   nel tooltip (ui-standard.js, anche quello tagliato da ->limit()) e nel
   dettaglio. Nella Lista non cambia nulla. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text-item-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* Email in Card (owner 3-nov-2026): una riga sola coi puntini, intera nel
   tooltip. La descrizione sotto il titolo (es. l'ID dell'ospite) solo nella
   Lista: .jo-card-no-desc sulla colonna. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-table-cell-email .fi-ta-text-item-label {
    display: block;
    white-space: nowrap;
    overflow-wrap: normal;
    text-overflow: ellipsis;
}
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-no-desc .fi-ta-text > p { display: none; }

.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type .fi-ta-text-item-label,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label] .fi-ta-text-item-label {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text > div > p,
.jo-ta-cards table.fi-ta-table > tbody > tr > td .fi-ta-text p.text-sm {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card compatte: le colonne di contorno (.jo-card-hide sulla colonna)
   restano solo nella Lista; la card tiene nome, stato, dato principale e
   le metriche. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hide {
    display: none;
}

/* Card meno piatte (cliente 29-ott-2026, tutte le card): titolo più forte;
   dove la riga ha uno stato, una barra in alto col colore del suo pallino e
   la testata tinta dello stesso colore, tranne il lime (sotto); gli stati neutri,
   come Bozza, restano lilla con la barra viola JOORNA: tutte le testate alla
   stessa altezza. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td[data-jo-label]:first-of-type .fi-ta-text-item-label,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell + td[data-jo-label] .fi-ta-text-item-label {
    font-size: 15px;
    font-weight: 700;
}

/* html e .fi-ta-row: vince sul separatore delle righe (design-system.css),
   che dalla seconda card in poi dava alla barra il colore del bordo. */
html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status) {
    --jo-card-tone: var(--ds-accent);
    border-top: 3px solid var(--jo-card-tone) !important;
}

html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status.fi-color-success) { --jo-card-tone: var(--ds-ok-dot); }
html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status.fi-color-warning) { --jo-card-tone: var(--ds-warn-dot); }
html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status.fi-color-danger) { --jo-card-tone: var(--ds-err-dot); }
html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status.fi-color-info) { --jo-card-tone: var(--ds-info-dot); }
html .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:has(.jo-cell-status.fi-color-primary) { --jo-card-tone: var(--ds-auto-dot); }

/* Il verde lime (stato positivo: Inviata, Attiva, Valido) resta sulla barra e sul
   pallino, mai su tutta la testata: il lime è un micro-accento (owner 18-nov-2026,
   card delle campagne inviate al telefono). Le altre tinte restano. */
.jo-ta-cards table.fi-ta-table > tbody > tr:has(.jo-cell-status:is(.fi-color-warning, .fi-color-danger, .fi-color-info, .fi-color-primary)) > td[data-jo-label]:first-of-type,
.jo-ta-cards table.fi-ta-table > tbody > tr:has(.jo-cell-status:is(.fi-color-warning, .fi-color-danger, .fi-color-info, .fi-color-primary)) > td.fi-ta-selection-cell + td[data-jo-label] {
    border-bottom-color: color-mix(in srgb, var(--jo-card-tone) 40%, var(--jo-ui-surface));
    background: color-mix(in srgb, var(--jo-card-tone) 18%, var(--jo-ui-surface));
}

/* Obiettivo delle campagne (CampaignObjectives::chip, 29-ott-2026): l'etichetta
   delle tabelle con la tinta fissa del suo obiettivo (token --ds-tag-1…6). In
   Card sta sulla riga dello stato, a destra, senza titolo: nessuna riga vuota
   e i blocchi di tutte le card alla stessa altezza. */
html .jo-cell-tag.jo-ctag-1 { --jo-ctag: var(--ds-tag-1); }
html .jo-cell-tag.jo-ctag-2 { --jo-ctag: var(--ds-tag-2); }
html .jo-cell-tag.jo-ctag-3 { --jo-ctag: var(--ds-tag-3); }
html .jo-cell-tag.jo-ctag-4 { --jo-ctag: var(--ds-tag-4); }
html .jo-cell-tag.jo-ctag-5 { --jo-ctag: var(--ds-tag-5); }
html .jo-cell-tag.jo-ctag-6 { --jo-ctag: var(--ds-tag-6); }
/* Categoria dell'ospite (HotelGuestFrequencyTagEnum::chip, owner 3-nov-2026). */
html .jo-cell-tag.jo-cat-vip { --jo-ctag: var(--ds-tag-violet); }
html .jo-cell-tag.jo-cat-gold { --jo-ctag: var(--ds-tag-gold); }
html .jo-cell-tag.jo-cat-silver { --jo-ctag: var(--ds-text-tertiary); }
html .jo-cell-tag.jo-cat-agency { --jo-ctag: var(--ds-tag-teal); }
html .jo-cell-tag.jo-cat-lead { --jo-ctag: var(--ds-tag-sky); }

html .jo-cell-tag.jo-ctag {
    /* Compatta (owner 30-ott-2026): oltre ~10 lettere i puntini, il nome intero nel tooltip
       (!important: la Card dà max-width 100% a tutto il contenuto delle celle). */
    display: inline-block;
    max-width: 6.5rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    border-color: color-mix(in srgb, var(--jo-ctag) 60%, transparent);
    background: color-mix(in srgb, var(--jo-ctag) 18%, transparent);
    color: var(--jo-ui-ink);
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-objective[data-jo-label]::before { display: none; }
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-objective .fi-ta-placeholder { visibility: hidden; }
.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td:has(.jo-cell-status) { grid-column: 1 / 3; }
.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td.jo-card-objective { grid-column: 3 / -1; justify-content: flex-end; }

/* Card con un dato principale (.jo-card-hero sulla colonna, es. i Ricavi
   delle campagne) e i numeri su una riga (.jo-card-metric): etichetta sopra
   il valore, il dato principale in grande su fondo lime quando c'è. Ogni
   numero largo quanto serve (mai a capo), le azioni in fondo alla card. */
.jo-ta-cards table.fi-ta-table:has(td.jo-card-metric) > tbody {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) {
    position: relative;
    display: grid;
    /* Proporzioni fisse, uguali in ogni card (i numeri allineati fra le card,
       titolo e obiettivo non le spostano): la seconda colonna un po' più larga
       per la nota ("2 non recapitate"), l'ultima più stretta. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr);
    align-content: start;
    column-gap: 12px;
    row-gap: 2px;
}

.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td {
    grid-column: 1 / -1;
}

.jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td.jo-card-metric {
    grid-column: auto;
    min-width: max-content;
}

/* Sul computer il titolo sta su una riga, coi puntini e il testo intero nel
   tooltip (CellStyle::fullText, per tutte le colonne): le testate restano alte uguali.
   Le azioni stanno ferme in fondo, alla stessa altezza in ogni card. */
@media (min-width: 640px) {
    .jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) {
        padding-bottom: 74px !important;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td[data-jo-label]:first-of-type .fi-ta-text-item-label,
    .jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td.fi-ta-selection-cell + td[data-jo-label] .fi-ta-text-item-label {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr:has(> td.jo-card-metric) > td:is(.fi-ta-actions-cell, :has(> .fi-ta-actions)) {
        position: absolute;
        right: 12px;
        bottom: 10px;
        left: 12px;
    }
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric > *,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero > * {
    flex: none;
    width: 100%;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric[data-jo-label]::before,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero[data-jo-label]::before {
    flex: none;
    width: 100%;
    overflow: visible;
    font-size: 11.5px;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric {
    order: 2;
    margin-top: 10px;
}

/* Un numero della riga che va dopo gli altri (.jo-card-later), es. una data
   nella colonna più larga (owner 30-ott-2026). */
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric.jo-card-later { order: 3; }

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric .fi-ta-text-item-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-metric .fi-ta-text p.text-sm {
    font-size: 11.5px;
    line-height: 1.3;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero {
    order: 1;
    margin-top: 8px;
    padding: 10px 12px !important;
    border-left: 3px solid var(--jo-ui-line);
    border-radius: 10px;
    background: var(--jo-ui-soft);
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero:not(:has(.fi-ta-placeholder)) {
    border-left-color: var(--ds-lime-strong);
    background: var(--ds-lime-bg);
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero .fi-ta-text-item-label,
.jo-ta-cards table.fi-ta-table > tbody > tr > td.jo-card-hero .fi-ta-placeholder {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-selection-cell {
    display: none;
}

/* Azioni in fondo alla card. Larghe quanto la card: il width 1% della
   cella Azioni in tabella (data-table.css) qui la riduceva a 2px e le icone
   uscivano dalla card a sinistra. */
.jo-ta-cards table.fi-ta-table > tbody > tr > td.fi-ta-actions-cell,
.jo-ta-cards table.fi-ta-table > tbody > tr > td:has(> .fi-ta-actions) {
    width: auto;
    order: 99;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 6px !important;
    border-top: 1px solid var(--jo-ui-line-2);
}

/* Card della stessa fila allineate riga per riga (segnalazione T5,
   29-ott-2026: «Sincronizzato» e le azioni ad altezze diverse). Ogni card
   prende le righe dalla griglia (subgrid): ogni riga è alta quanto la più alta
   della fila, così la stessa riga sta alla stessa altezza in tutte le card e
   le azioni chiudono la card. 30 righe a card bastano per ogni tabella: quelle
   che restano vuote sono alte zero. Fra le file lo spazio è il margine della
   card (con lo spazio della griglia le righe vuote lo moltiplicherebbero).
   Le azioni e un segnaposto vuoto (::after) stanno nell'ultima riga, nella
   stessa colonna (con la colonna automatica la seconda ne apriva un'altra),
   così il fondo della card conta anche dove l'ultima riga sarebbe vuota.
   Sotto i 640px le card sono una per fila e restano in colonna (mobile.css
   porta lì le azioni sulla testata). */
@media (min-width: 640px) {
    .jo-ta-cards table.fi-ta-table > tbody {
        row-gap: 0;
        padding-bottom: 4px;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr {
        margin-bottom: 10px;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:not(.jo-row-detail):not(:has(> td[colspan])) {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: subgrid;
        grid-row: span 30;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row:not(.jo-row-detail):not(:has(> td[colspan]))::after {
        content: '';
        grid-area: -2 / 1 / -1 / 2;
    }

    .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row > td.fi-ta-actions-cell,
    .jo-ta-cards table.fi-ta-table > tbody > tr.fi-ta-row > td:has(> .fi-ta-actions) {
        grid-area: -2 / 1 / -1 / 2;
    }
}

/* Legenda automatica delle icone di stato (public/js/table-columns.js). */
.jo-auto-legend {
    position: relative;
    display: inline-flex;
}

.jo-legend--auto {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 15rem;
    padding: 10px 12px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 12px;
    background: var(--jo-ui-surface);
    box-shadow: var(--ds-shadow-raised);
}

.jo-legend--auto[hidden] {
    display: none;
}

.jo-legend [data-jo-legend-auto] .jo-legend-title {
    margin-top: 6px;
}

.jo-legend-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

.jo-legend-icon svg {
    width: 16px;
    height: 16px;
}

/* ── Sistema ▸ Changelog ───────────────────────────────────── */

.jo-cl {
    overflow: hidden;
    border: 1px solid var(--jo-ui-line);
    border-radius: var(--jo-ui-radius);
    background: var(--jo-ui-surface);
}

.jo-cl-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--jo-ui-line);
}

.jo-cl-search {
    display: flex;
    flex: 0 1 16rem;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 8px;
    color: var(--jo-ui-muted);
}

.jo-cl-search svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}

.jo-cl-search input {
    flex: 1;
    min-width: 0;
    padding: 7px 0;
    border: 0;
    background: transparent;
    font-size: 13.5px;
    color: var(--jo-ui-ink);
    box-shadow: none !important;
}

.jo-cl-toolbar select {
    flex: 0 1 12rem;
    padding: 7px 30px 7px 10px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 8px;
    background-color: transparent;
    font-size: 13.5px;
    color: var(--jo-ui-ink);
}

.jo-cl-count {
    margin-right: auto;
    font-size: 12px;
    color: var(--jo-ui-muted);
}

.jo-cl-release + .jo-cl-release {
    border-top: 1px solid var(--jo-ui-line);
}

.jo-cl-release > summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.jo-cl-release > summary::-webkit-details-marker {
    display: none;
}

.jo-cl-release > summary:hover {
    background: var(--jo-ui-soft);
}

.jo-cl-release-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-cl-release-title,
.jo-cl-release-period {
    flex: none;
    white-space: nowrap;
}

/* Una riga per mese (owner 11-nov-2026): il periodo grigio, la sintesi coi
   puntini e intera nel tooltip, il numero degli interventi senza pill. */
.jo-cl-release-period {
    font-size: 12px;
    color: var(--jo-ui-muted);
}

.jo-cl-release-headline {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    color: var(--jo-ui-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.jo-cl-release-count {
    flex: none;
    min-width: 2ch;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--jo-ui-muted);
}

/* Telefono: filtri a tutta riga (due tendine affiancate, la ricerca sotto) e
   per ogni mese nome, periodo e numero; la sintesi si legge aprendolo. */
@media (max-width: 640px) {
    .jo-cl-toolbar { display: grid; grid-template-columns: 1fr 1fr auto; }
    .jo-cl-toolbar .jo-cl-count { grid-column: 1 / -1; }
    .jo-cl-toolbar select { min-width: 0; }
    .jo-cl-search { grid-column: 1 / 3; }
    .jo-cl-release-headline { visibility: hidden; }
}

.jo-cl-chevron {
    align-self: center;
    width: 18px;
    height: 18px;
    color: var(--jo-ui-muted);
    transition: transform 0.15s;
}

.jo-cl-release[open] .jo-cl-chevron {
    transform: rotate(180deg);
}

.jo-cl-items {
    margin: 0;
    padding: 0 16px 8px;
    list-style: none;
}

.jo-cl-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--jo-ui-line-2);
}

.jo-cl-item-body {
    flex: 1;
    min-width: 0;
}

.jo-cl-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.jo-cl-item-title {
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-cl-area {
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--jo-ui-soft);
    font-size: 11.5px;
    color: var(--jo-ui-muted);
}

.jo-cl-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--jo-ui-muted);
    white-space: nowrap;
}

.jo-cl-item-desc {
    margin: 3px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--jo-ui-muted);
}

.jo-cl-details {
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--jo-ui-muted);
}

.jo-cl-details summary {
    cursor: pointer;
    color: var(--jo-ui-accent);
    font-weight: 600;
}

.jo-cl-details ul {
    margin: 4px 0 0;
    padding-left: 18px;
    list-style: disc;
}

.jo-cl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 40px 16px;
    color: var(--jo-ui-muted);
    text-align: center;
}

.jo-cl-empty svg {
    width: 28px;
    height: 28px;
}

.jo-cl-empty strong {
    color: var(--jo-ui-ink);
}

.jo-cl-note {
    margin: 0;
    font-size: 12px;
    text-align: center;
    color: var(--jo-ui-muted);
}

/* Modulo esterno incorporato (Sistema ▸ Ticket IT). */
.jo-embed {
    overflow: hidden;
    border: 1px solid var(--jo-ui-line);
    border-radius: var(--jo-ui-radius);
    background: var(--ds-surface, #fff);
}

.jo-embed iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 16rem);
    min-height: 620px;
    border: 0;
}

/* ── Gruppi hotel: card ─────────────────────────────────────── */

.jo-grp-grid {
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
}

.jo-grp-card {
    gap: 10px;
}

.jo-grp-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.jo-grp-members {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.jo-grp-count {
    margin-right: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-grp-manage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--jo-ui-accent);
}

.jo-grp-manage svg {
    width: 14px;
    height: 14px;
}

/* ── Libreria immagini: griglia ─────────────────────────────── */

.jo-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
}

.jo-media-card {
    gap: 6px;
    padding: 8px 8px 10px;
}

.jo-media-card > :not(.jo-media-thumb) {
    margin-inline: 4px;
}

.jo-media-card.is-off .jo-media-thumb img {
    opacity: 0.45;
    filter: grayscale(0.6);
}

.jo-media-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: var(--jo-ui-soft);
    cursor: zoom-in;
}

.jo-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pill .jo-qf sul fondo della pagina, mai dentro la striscia bianca delle
   tab di Filament (il bg-white che design-system.css porta al colore delle
   card): es. i cataloghi della Libreria immagini. */
html .fi-tabs.jo-qf {
    background: none !important;
    box-shadow: none !important;
}

.jo-media-tabs {
    margin-inline: 0;
}

/* ── Preventivatore (pilota Joorna): liste Richieste e Preventivi ── */

.jo-q-row > td {
    vertical-align: top;
}

.jo-q-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--jo-ui-ink);
}

.jo-q-strong {
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-q-muted {
    font-size: 12.5px;
    color: var(--jo-ui-muted);
}

.jo-q-faint {
    font-size: 11.5px;
    color: var(--jo-ui-muted);
    opacity: 0.85;
}

.jo-q-clamp {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-q-guest {
    min-width: 9.5rem;
}

.jo-q-proposal .jo-q-clamp {
    max-width: 12.5rem;
}

.jo-q-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--jo-ui-accent-soft);
    font-size: 11px;
    font-weight: 700;
    color: var(--jo-ui-accent);
}

.jo-q-guest-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
}

.jo-q-flag {
    font-size: 15px;
    line-height: 1;
}

.jo-q-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

/* Colonna Invio: un fatto per riga, icona + testo. */
.jo-q-delivery-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jo-q-fact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--jo-ui-muted);
    white-space: nowrap;
}

.jo-q-fact svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.jo-q-fact--on {
    color: var(--jo-ui-ink);
}

.jo-q-fact--on svg {
    color: var(--jo-ui-accent);
}

.jo-q-fact--ok svg {
    color: var(--jo-ui-ok);
}

.jo-q-ico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 24px;
    height: 24px;
    padding: 0 3px;
    border-radius: 7px;
    color: var(--jo-ui-muted);
    vertical-align: middle;
}

button.jo-q-ico:hover {
    background: var(--jo-ui-soft);
    color: var(--jo-ui-accent);
}

.jo-q-ico svg {
    width: 16px;
    height: 16px;
}

.jo-q-ico small {
    font-size: 11px;
    font-weight: 600;
}

.jo-q-ico--ok {
    color: var(--jo-ui-ok);
}

.jo-q-ico--warn {
    color: var(--jo-ui-warn);
}

.jo-q-ico--wa:hover {
    color: var(--ds-ok-fg);
}

.jo-q-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-left: 2px;
    padding: 0 6px;
    border: 1px solid var(--jo-ui-line);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--jo-ui-muted);
}

.jo-q-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}

.jo-q-dates {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.jo-q-arrow {
    width: 14px;
    height: 14px;
    color: var(--jo-ui-muted);
}

.jo-q-ref {
    font-size: 12px;
    font-weight: 600;
    color: var(--jo-ui-muted);
}

.jo-q-expiry {
    font-weight: 600;
    white-space: nowrap;
}

.jo-q-expiry--warning {
    color: var(--jo-ui-warn);
}

.jo-q-expiry--danger {
    color: var(--jo-ui-danger);
}

.jo-q-expiry--ok {
    color: var(--jo-ui-ok);
}

.jo-q-expiry--muted {
    font-weight: 400;
    color: var(--jo-ui-muted);
}

/* Celle ricche: il padding lo dà la cella, non il contenitore Filament. */
.jo-q-row .fi-ta-col-wrp > a,
.jo-q-row .fi-ta-col-wrp > div {
    padding: 0 !important;
}

/* Pilota Preventivatore: intestazioni più strette (le celle ricche hanno già il loro padding). */
.jo-quote-pilot .fi-ta:not(.jo-ta-cards) .jo-q-row ~ tr,
.jo-quote-pilot .fi-ta-header-cell {
    padding-inline: 8px !important;
}

.jo-quote-pilot .fi-ta-header-cell:first-of-type {
    padding-inline-start: 14px !important;
}

/* ── Preventivi: le soluzioni nella riga (22-ott-2026, benchmark) ──
 * Un riquadro con una riga per soluzione: quando (numero, arrivo, partenza,
 * notti) · sistemazione (trattamento e camera, una per camera) · prezzo. */
/* La colonna Soluzioni prende lo spazio (owner 22-ott-2026): eccezione dichiarata
   al limite di 15rem per cella di data-table.css; le altre colonne si stringono. */
@media (min-width: 1280px) {
    html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) > thead > tr > th.jo-q-sols-col,
    html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) > tbody > tr > td.jo-q-sols-col {
        width: 100% !important;
        max-width: none !important;
    }
    /* Le altre colonne al minimo: il numero e la scadenza vanno a capo. */
    html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell div,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell span,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell p,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell a,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell time,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell img,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell button,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell label,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell ul,
html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) td.fi-table-cell-reference .jo-q-cell li {
        white-space: normal !important;
    }
    /* Info (stato, invio, provenienza): larga quanto «Inviato 19/10», non si taglia. */
    html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) > thead > tr > th.jo-q-status-col,
    html body .fi-page .fi-ta:not(.jo-ta-cards) .fi-ta-table:not(.jo-cols-sized) > tbody > tr > td.jo-q-status-col {
        width: 9rem !important;
        min-width: 9rem !important;
    }
}
.jo-q-sols {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 6px 0;
    border: 1px solid var(--ds-border, #DFE2EA);
    border-radius: 10px;
    background: var(--ds-surface, #FCFCFD);
}
.jo-q-sol {
    display: grid;
    /* Due righe basse a tutta larghezza (owner 22-ott-2026): numero, date, notti;
       sotto camera e trattamento; il prezzo a destra. */
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 2px 16px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--ds-text-secondary, #3F3F46);
}
.jo-q-sol + .jo-q-sol { border-top: 1px solid var(--ds-row-divider, var(--ds-border)); }
.jo-q-sol-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jo-q-sol-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.jo-q-sol-n { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ds-text-primary, #18181B); white-space: nowrap; }
.jo-q-sol-when { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ds-text-primary, #18181B); }
.jo-q-sol-line small, .jo-q-sol-room small { font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-q-sol-room { min-width: 0; }
.jo-q-sol-room span { color: var(--ds-text-secondary, #3F3F46); }
/* Nel riquadro il testo va a capo: la regola delle celle lo terrebbe su una riga coi puntini. */
.fi-ta-table td .jo-q-sols .jo-q-sol-main, .fi-ta-table td .jo-q-sols .jo-q-sol-main div, .fi-ta-table td .jo-q-sols .jo-q-sol-main span, .fi-ta-table td .jo-q-sols .jo-q-sol-main b, .fi-ta-table td .jo-q-sols .jo-q-sol-main strong, .fi-ta-table td .jo-q-sols .jo-q-sol-main em, .fi-ta-table td .jo-q-sols .jo-q-sol-main small { white-space: normal !important; text-overflow: clip !important; overflow: visible !important; }
.fi-ta-table td .jo-q-sols .jo-q-sol-n,
.fi-ta-table td .jo-q-sols .jo-q-sol-when { white-space: nowrap !important; }
.jo-q-sol-price { grid-column: 2; grid-row: 1; font-size: 14px; font-weight: 650; color: var(--ds-text-primary, #18181B); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jo-q-sol.is-best .jo-q-best, .jo-q-sol.is-chosen .jo-q-best { color: var(--ds-accent, #7145D9); }
.jo-q-sol.is-chosen { background: var(--ds-ok-bg, #F1F8F1); }
.jo-q-info-delivery { margin-top: 2px; }
/* L'invio sotto lo stato, un fatto per riga. */
.jo-q-info-delivery .jo-q-delivery-list { display: flex; flex-direction: column; gap: 2px; }
/* Vista a card e telefono: la colonna non impone la sua larghezza, e ogni
   soluzione va su due righe (quando · prezzo, poi la sistemazione). */
.jo-ta-cards .fi-ta-table td.jo-q-sols-col { width: auto; min-width: 0; }
/* Vista Card: solo il riassunto (date, prezzo, quante soluzioni); il riquadro
   completo resta della Lista (regola delle Card: dato principale e poco altro). */
.jo-q-sols-brief { display: none; }
.jo-ta-cards .jo-q-sols { display: none; }
.jo-ta-cards .jo-q-sols-brief { display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--ds-text-primary, #18181B); }
.jo-q-sols-brief small { font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }
/* Nelle card strette i dati vanno a capo invece di tagliarsi a metà
   («27 dic 2026 → 3 gen 2027», «Prenotato · n. …»). */
.jo-ta-cards .fi-ta-table td .jo-q-sols-brief, .jo-ta-cards .fi-ta-table td .jo-q-expiry, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief div, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief span, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief b, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief strong, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief em, .jo-ta-cards .fi-ta-table td .jo-q-sols-brief small { white-space: normal !important; text-overflow: clip !important; overflow: visible !important; overflow-wrap: break-word; }
/* Card uguali fra loro (owner 22-ott-2026): stessa altezza della testata (col
   nome e, se ci sono, le icone dei tag), così ogni dato sta allo stesso punto
   in tutte le card. */
.jo-ta-cards .fi-ta-table td.fi-table-cell-guest { min-height: 106px; }
.jo-ta-cards .fi-ta-table td.fi-table-cell-guest .jo-q-guest { min-height: 66px; justify-content: flex-start; }
/* L'invio è contorno: nelle card non c'è (resta nella Lista). */
.jo-ta-cards .jo-q-info-delivery { display: none; }
.jo-q-sols svg.jo-q-arrow { display: inline-block; flex: none; width: 14px; height: 14px; }
@media (max-width: 767px) {
    .fi-ta-table td.jo-q-sols-col, .fi-ta-table th.jo-q-sols-col { width: auto; min-width: 0; }
}

/* ── Preventivatore (pilota): card Cliente, comune a Richiesta e Preventivo ── */

.jo-cc-avatar {
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--jo-ui-accent-soft);
    font-weight: 700;
    color: var(--jo-ui-accent);
}

.jo-cc-dot--ok {
    background: var(--jo-ui-ok);
}

/* ── Dettaglio Richiesta (pilota) ── */

.jo-tone-warn {
    color: var(--jo-ui-warn) !important;
}

.jo-link {
    color: var(--jo-ui-accent);
    text-decoration: underline;
}

.jo-rq2-noteform {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* ── Dettaglio Preventivo (pilota): workspace semplificato ── */

.jo-qh {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Richiesta associata: testata fissa del preventivo (owner 5-ott-2026),
   sempre in vista mentre si compone. Solo lettura: chiusa è una riga, la
   freccia apre qui tutti i dettagli della richiesta. */
.jo-qh-req {
    position: sticky;
    top: calc(var(--jo-topbar-h, 64px) + 8px);
    /* Sopra il velo della pagina (9), sotto la topbar (20): a pari livello
       copriva il menu della ricerca in alto (owner 12-ott-2026). */
    z-index: 15;
    border: 1px solid var(--ds-border);
    border-left: 3px solid var(--ds-accent);
    border-radius: 12px;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-raised);
}

.jo-qh-req-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 11px;
    text-align: left;
}

.jo-qh-req-head:hover {
    background: var(--ds-surface-hover);
}

.jo-qh-req-ic {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--ds-accent-soft);
    color: var(--ds-accent);
}

.jo-qh-req-ic svg {
    width: 18px;
    height: 18px;
}

.jo-qh-req-who {
    flex: 1;
    min-width: 0;
}

.jo-qh-req-kicker {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ds-accent);
}

.jo-qh-req-line {
    display: block;
    overflow: hidden;
    font-size: 14px;
    color: var(--ds-text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.jo-qh-req-line span {
    color: var(--ds-text-secondary);
}

.jo-qh-req-line span::before {
    content: "·";
    margin: 0 6px;
    color: var(--ds-text-tertiary);
}

.jo-qh-req-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ds-accent);
}

.jo-qh-req-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform .15s ease;
}

.jo-qh-req.is-open .jo-qh-req-toggle svg {
    transform: rotate(180deg);
}

/* Telefono (owner 12-ott-2026): la riga chiusa è per chi e per cosa —
   niente tessera dell'icona né testo accanto alla freccia, lo stato si
   accorcia coi puntini invece di schiacciare il nome. */
@media (max-width: 640px) {
    .jo-qh-req-head { gap: 8px; padding: 10px 12px; }
    .jo-qh-req-head > .jo-qh-req-ic { display: none; }
    .jo-qh-req-toggle > span { display: none; }
    .jo-qh-req-head > .fi-badge { flex: 0 1 auto; min-width: 0; max-width: 40%; }
}

.jo-qh-req-body {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 16px 12px;
}

.jo-qh-req-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px 24px;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--ds-row-divider);
}

.jo-qh-req-facts dt {
    font-size: 11.5px;
    color: var(--ds-text-tertiary);
}

.jo-qh-req-facts dd {
    margin: 1px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ds-text-primary);
    overflow-wrap: anywhere;
}

.jo-qh-req-notes {
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--ds-surface-sunken);
    font-size: 13px;
    color: var(--ds-text-secondary);
}

.jo-qh-req-notes span {
    margin-right: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ds-text-tertiary);
}

.jo-qh-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

.jo-qh-id {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jo-qh-id h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--jo-ui-ink);
}

.jo-tone-danger {
    color: var(--jo-ui-danger) !important;
}

.jo-qh-actions {
    margin-left: auto;
}

/* Cliente in una riga. */

.jo-cs-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--jo-ui-ink);
}

.jo-cs-name:hover {
    color: var(--jo-ui-accent);
}

/* Soggiorno in un blocco. */
.jo-qs-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 10px 18px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid var(--jo-ui-line);
    border-radius: var(--jo-ui-radius);
    background: var(--jo-ui-surface);
}

.jo-qs-facts dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-qs-facts dd {
    display: flex;
    flex-direction: column;
    margin: 2px 0 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-qs-facts dd small {
    font-size: 11.5px;
    font-weight: 400;
    color: var(--jo-ui-muted);
}

.jo-quote-pilot [data-jo-proposals] > .flex.gap-x-3 {
    display: none;
}

/* ── Composizione guidata del preventivo (pilota Joorna) ── */

/* Stepper compatto, sempre visibile in cima allo step. */
.jo-qwiz {
    overflow: visible !important;
}

.jo-qwiz > ol {
    position: sticky;
    top: var(--jo-topbar-h, 64px);
    z-index: 5;
    border-radius: var(--jo-ui-radius) var(--jo-ui-radius) 0 0;
    background: var(--jo-ui-surface);
}

.jo-qwiz > ol button {
    padding-block: 10px !important;
}

.jo-qwiz .fi-fo-wizard-header-step-description {
    font-size: 11.5px;
}

/* Tre step compatti: icona piccola, etichetta e stato reale dello step. */
.jo-qwiz > ol button {
    gap: 10px !important;
    padding-inline: 16px !important;
}

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

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

.jo-qwiz .fi-fo-wizard-header-step.fi-active .fi-fo-wizard-header-step-label {
    font-weight: 700;
}

.jo-qwiz .fi-fo-wizard-header-step.fi-active {
    box-shadow: inset 0 -2px 0 var(--jo-ui-accent);
}

/* La card della proposta è la testata della soluzione aperta (non si richiude). */
.jo-quote-pilot [data-jo-proposals] > ul > div > li.fi-fo-repeater-item > .fi-fo-repeater-item-header {
    align-items: flex-start;
    padding: 12px 14px;
}

.jo-quote-pilot [data-jo-proposals] > ul > div > li.fi-fo-repeater-item > .fi-fo-repeater-item-header > h4 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.jo-pc-main {
    flex: 1;
}

.jo-pc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 400;
}

.jo-pc-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.jo-pc-n {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--jo-ui-muted);
}

.jo-pc-best,
.jo-pc-ok,
.jo-pc-todo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    font-weight: 600;
}

.jo-pc-best {
    color: var(--jo-ui-accent);
}

.jo-pc-ok {
    color: var(--jo-ui-ok);
}

.jo-pc-todo {
    color: var(--jo-ui-warn);
}

.jo-pc-best svg,
.jo-pc-ok svg,
.jo-pc-todo svg {
    width: 14px;
    height: 14px;
}

.jo-pc-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.jo-pc-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.jo-pc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--jo-ui-ink);
}

.jo-pc-line {
    overflow: hidden;
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--jo-ui-muted);
}

.jo-pc-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    white-space: nowrap;
}

.jo-pc-price strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--jo-ui-ink);
}

.jo-pc-price small {
    font-size: 11px;
    color: var(--jo-ui-muted);
}

/* Telefono: stepper su una riga compatta (scorre se serve), non una lista verticale. */
@media (max-width: 767px) {
    .jo-qwiz > ol {
        display: flex !important;
        overflow-x: auto;
        top: 56px;
    }

    .jo-qwiz > ol > li {
        flex: 0 0 auto;
        border: 0 !important;
    }

    .jo-qwiz > ol > li > button {
        padding: 8px 10px !important;
        gap: 6px !important;
    }

    .jo-qwiz > ol > li > button > div:first-child,
    .jo-qwiz > ol > li > button > span:first-child {
        width: 28px !important;
        height: 28px !important;
    }

    .jo-qwiz .fi-fo-wizard-header-step-label {
        font-size: 12.5px;
        white-space: nowrap;
    }

    .jo-qwiz > ol > li > div[aria-hidden="true"] {
        display: none;
    }
}

/* ── Preventivo (pilota Joorna): percorso Dati · Proposte · Pagina · Anteprima ── */

/* Testata: "Preventivo #OF/2026/12", titolo sotto; i fatti stanno nelle tessere (request-summary). */
.jo-qh-id h1 {
    font-size: 22px;
}

.jo-qh-kind {
    font-weight: 500;
    color: var(--jo-ui-muted);
}

.jo-qh-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--jo-ui-muted);
}

/* Stepper leggero: numeri, niente frecce, lo step corrente sottolineato. */
.jo-qwiz > ol {
    border-bottom: 1px solid var(--jo-ui-divider, var(--jo-ui-line-2)) !important;
}

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

.jo-qwiz .fi-fo-wizard-header-step-icon-ctn {
    width: 26px !important;
    height: 26px !important;
    border-width: 1.5px !important;
}

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

.jo-qwiz > ol button {
    padding-block: 9px !important;
}

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

.jo-qwiz .fi-fo-wizard-header-step-description {
    font-size: 11.5px !important;
}

/* Fasce: titolo piccolo, valori in riga, separate da un filo — non card. */
.jo-qb + .jo-qb,
.jo-qb.fi-section,
.jo-qb-static + .fi-section {
    margin-top: 0;
}

.jo-qb-static {
    padding: 14px 0;
    border-top: 1px solid var(--jo-ui-line-2);
}

.jo-qwiz .fi-fo-wizard-step > .grid > :first-child > .jo-qb-static,
.jo-qwiz .fi-fo-wizard-step .jo-qb-static:first-child {
    padding-top: 2px;
    border-top: 0;
}

.jo-qb-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin-bottom: 8px;
}

.jo-qb-head h3 {
    margin: 0;
    font-size: var(--ds-fs-h4);
    font-weight: 700;
    color: var(--jo-ui-ink);
}

.jo-qb-head .jo-q-muted,
.jo-qb-empty {
    margin: 0;
    font-size: 12.5px;
}

.jo-qb .jo-qs-facts {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.fi-section.jo-qb {
    border-top: 1px solid var(--jo-ui-line-2);
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fi-section.jo-qb > .fi-section-header {
    padding: 14px 0 8px !important;
}

.fi-section.jo-qb .fi-section-header-heading {
    font-size: var(--ds-fs-h4) !important;
    font-weight: 700 !important;
}

.fi-section.jo-qb .fi-section-header-description {
    font-size: 12.5px !important;
}

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

.fi-section.jo-qb > .fi-section-content-ctn > .fi-section-content {
    padding: 0 0 14px !important;
}

.fi-section.jo-qb.fi-collapsed > .fi-section-header {
    padding-bottom: 14px !important;
}

/* Destinatario: avatar, fatti in riga, piccole azioni. */
.jo-qr {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jo-qr .jo-cc-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}

.jo-qr-facts {
    flex: 1;
    min-width: 0;
}

.jo-qr-email dd {
    overflow: hidden;
    text-overflow: ellipsis;
}

.jo-qr-facts a {
    color: inherit;
}

.jo-qr-facts a:hover {
    color: var(--jo-ui-accent);
}

.jo-qr-tags {
    flex-wrap: wrap;
    gap: 3px !important;
}

.jo-qr-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Proposte: niente card intorno, introduzione breve, AI come link. */
.fi-section.jo-qprops {
    background: transparent !important;
    box-shadow: none !important;
}

.jo-qprops > .fi-section-header {
    padding: 0 0 12px !important;
}

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

.jo-qprops > .fi-section-content-ctn > .fi-section-content {
    padding: 0 !important;
}

.jo-qprops .fi-section-header-heading {
    font-size: var(--ds-fs-h3) !important;
}

/* Selettore delle soluzioni: una alla volta. */
.jo-psel[data-jo-sel="0"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(1)),
.jo-psel[data-jo-sel="1"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(2)),
.jo-psel[data-jo-sel="2"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(3)),
.jo-psel[data-jo-sel="3"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(4)),
.jo-psel[data-jo-sel="4"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(5)),
.jo-psel[data-jo-sel="5"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(6)),
.jo-psel[data-jo-sel="6"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(7)),
.jo-psel[data-jo-sel="7"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(8)),
.jo-psel[data-jo-sel="8"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(9)),
.jo-psel[data-jo-sel="9"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(10)),
.jo-psel[data-jo-sel="10"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(11)),
.jo-psel[data-jo-sel="11"] [data-jo-proposals] > ul > div > li.fi-fo-repeater-item:not(:nth-child(12)) {
    display: none;
}

/* Completezza della proposta: discreta. */
.jo-pc-todo {
    font-weight: 500 !important;
}

/* ── Step 4: anteprima come pagina d'offerta ── */
.jo-qp4 {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Barra di review sopra l'anteprima: stato a sinistra, invio a destra. */
.jo-qp4-bar-top {
    position: sticky;
    top: var(--jo-topbar-h, 64px);
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--jo-ui-surface);
    box-shadow: var(--jo-ui-edge, 0 0 0 1px var(--jo-ui-line));
    font-size: 13px;
}

.jo-qp4-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

.jo-qp4-state ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--jo-ui-warn);
}

.jo-qp4-state li.is-soft {
    color: var(--jo-ui-muted);
}

.jo-qp4-go {
    display: flex;
    align-items: center;
    gap: 14px;
}

.jo-qp4-offer {
    cursor: pointer;
}

.jo-qp4-offer.is-sel {
    box-shadow: 0 0 0 2px var(--ds-text-primary), var(--ds-shadow-raised);
}

.jo-qp4-frame {
    --jo-brand: var(--jo-primary-600, #7C5CCB);
    overflow: hidden;
    max-width: 68rem;
    width: 100%;
    margin-inline: auto;
    border-radius: 14px;
    background: #f6f5f2;
    box-shadow: 0 0 0 1px rgb(22 22 42 / 8%), 0 12px 32px rgb(22 22 42 / 10%);
    color: #1f1f2e;
}

.jo-qp4-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #ececf0;
    font-size: 11px;
    color: #6b6b80;
}

.jo-qp4-bar i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d4d4dc;
}

.jo-qp4-bar span {
    margin-left: 8px;
}

.jo-qp4-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 26px;
}

.jo-qp4-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    justify-content: space-between;
    min-height: 340px;
    padding: 26px 36px 32px;
    /* Senza foto: un fondo neutro, mai il viola del brand. */
    background: linear-gradient(160deg, #3a3b42, #1d1e23);
    background-position: center;
    background-size: cover;
    color: #fff;
    transition: background-image 0.25s;
}

.jo-qp4-hero-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 44rem;
}

.jo-qp4-logo {
    max-width: 130px;
    max-height: 40px;
    margin-bottom: 14px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgb(255 255 255 / 92%);
    object-fit: contain;
}

.jo-qp4-hotel {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
}

.jo-qp4-for {
    margin: 0;
    font-size: 13px;
    opacity: 0.85;
}

.jo-qp4-title {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 1px 12px rgb(0 0 0 / 25%);
    letter-spacing: -0.01em;
}

.jo-qp4-letter {
    margin: 0 36px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #fff /* pagina del cliente: resta bianca anche in dark */;
}

.jo-qp4-letter h3,
.jo-qp4-more h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--jo-brand);
}

.jo-qp4-letter p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #3a3a4d;
}

.jo-qp4-offer {
    overflow: hidden;
    margin: 0 20px;
    border-radius: 14px;
    background: #fff /* pagina del cliente: resta bianca anche in dark */;
    box-shadow: 0 1px 2px rgb(22 22 42 / 6%);
}

.jo-qp4-offer.is-best {
    box-shadow: 0 0 0 2px var(--jo-brand);
}

.jo-qp4-offers {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Soluzione: foto della camera a sinistra, dettagli a destra. */
.jo-qp4-offer {
    display: grid;
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
}

.jo-qp4-media {
    position: relative;
    min-height: 240px;
    background: #e9e8e4;
}

.jo-qp4-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jo-qp4-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jo-brand);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.jo-qp4-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 16px;
}

.jo-qp4-n {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a9a;
}

.jo-qp4-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12.5px;
    color: #4a4a5c;
}

.jo-qp4-facts li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jo-qp4-facts svg {
    width: 14px;
    height: 14px;
    color: #9a9aaa;
}

.jo-qp4-empty {
    margin: 0 36px;
    padding: 24px;
    border: 1px dashed #d4d4dc;
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    color: #6b6b80;
}

.jo-qp4-more {
    margin: 0 36px;
}

.jo-qp4-more div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jo-qp4-more span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff /* pagina del cliente: resta bianca anche in dark */;
    font-size: 12px;
}

.jo-qp4-foot {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 36px;
    padding-top: 12px;
    border-top: 1px solid #e4e4ea;
    font-size: 12px;
    color: #6b6b80;
}

.jo-qp4-foot strong {
    color: #1f1f2e;
}

.jo-qp4-open {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--jo-ui-accent);
}

.jo-qp4-open svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 900px) {
    .jo-qp4-offer {
        grid-template-columns: 1fr;
    }

    .jo-qp4-media {
        min-height: 190px;
    }

    .jo-qp4-hero {
        min-height: 260px;
        padding: 20px;
    }

    .jo-qp4-title {
        font-size: 26px;
    }

    .jo-qp4-letter,
    .jo-qp4-offer,
    .jo-qp4-empty,
    .jo-qp4-more,
    .jo-qp4-foot {
        margin-inline: 16px !important;
    }
}

@media (max-width: 767px) {
    .jo-qr {
        align-items: flex-start;
    }

    .jo-qr .jo-cc-avatar {
        display: none;
    }
}

/* Le parti della pagina d'anteprima non si comprimono: scorre la pagina. */
.jo-qp4-page > * {
    flex-shrink: 0;
}

/* Fasce e Proposte: nessuna cornice da card (vince sul refinement globale delle sezioni). */
html .jo-qwiz .fi-section.jo-qb:not(.fi-aside):not(.jo-x),
html .jo-qwiz .fi-section.jo-qprops:not(.fi-aside):not(.jo-x) {
    background: transparent !important;
    box-shadow: none !important;
}

.jo-qr-facts dd {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* ── Form di contatto: costruttore a step (stesso linguaggio del Preventivatore) ── */

/* Sezioni avanzate richiuse dentro una fascia (Personalizza, Test A/B): sottili. */
html .jo-qwiz .fi-section.jf-more:not(.jo-x) {
    background: var(--jo-ui-soft) !important;
    box-shadow: none !important;
}

.jf-more .fi-section-header-heading {
    font-size: 13px !important;
}

.jf-empty {
    margin: 0;
    font-size: 13px;
}


/* La prima fascia di uno step non ha il filo sopra. */
.jo-qwiz .fi-fo-wizard-step > div > div:first-child > .fi-section.jo-qb,
.jo-qwiz .fi-fo-wizard-step > div > div:first-child > .jo-qb-static {
    border-top: 0;
}

/* ── Guscio degli step (Preventivatore e Form di contatto) ──
 * Lo stepper è una barra; ogni blocco di uno step è una card bianca sullo
 * sfondo pagina, con titolo chiaro: blocchi ben separati, niente card
 * dentro card, niente "pagina piena di campi". */
html .jo-qwiz.fi-fo-wizard:not(.jo-x) {
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.jo-qwiz > ol {
    border-bottom: 0 !important;
    border-radius: 14px !important;
    background: var(--jo-ui-surface) !important;
    box-shadow: var(--jo-ui-edge, 0 0 0 1px var(--jo-ui-line));
}

.jo-qwiz > ol > li {
    border: 0 !important;
}

.jo-qwiz .fi-fo-wizard-step {
    padding: 16px 0 0 !important;
}

.jo-qwiz .fi-fo-wizard-step > .fi-fo-component-ctn {
    gap: 14px !important;
}

html .jo-qwiz .fi-section.jo-qb:not(.fi-aside):not(.jo-x),
html .jo-qwiz .jo-qb-static:not(.jo-x) {
    border-top: 0 !important;
    border-radius: 12px !important;
    background: var(--jo-ui-surface) !important;
    box-shadow: var(--jo-ui-edge, 0 0 0 1px var(--jo-ui-line)) !important;
}

.jo-qwiz .jo-qb-static {
    padding: 16px 20px 18px !important;
}

.jo-qwiz .jo-qb-head h3 {
    font-size: var(--ds-fs-h3) !important;
    font-weight: 700 !important;
}

.jo-qwiz .jo-qb-head {
    margin-bottom: 12px;
}

/* I pulsanti Indietro / Continua fuori dalle card, allineati ai blocchi. */
.jo-qwiz > .fi-fo-wizard-footer,
.jo-qwiz > div:last-child:not(.fi-fo-wizard-step) {
    padding: 16px 0 0 !important;
}

/* Anteprima: etichetta discreta sulle foto non della camera proposta (solo per l'operatore). */
.jo-qp4-hero,
.jo-qp4-media {
    position: relative;
}

/* Contenuto della proposta aperta: margini interni coerenti con le card dello step Dati. */
.jo-quote-pilot [data-jo-proposals] > ul > div > li.fi-fo-repeater-item > .fi-fo-repeater-item-content {
    padding: 0 20px 4px !important;
}

/* ── Anteprima come pagina commerciale (gerarchia: foto → messaggio →
 *    soggiorno → soluzioni → prezzi e servizi → validità → CTA) ── */
.jo-qp4-hero {
    min-height: 380px;
}

.jo-qp4-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
}

.jo-qp4-hero .jo-qp4-logo,
.jo-qp4-hero .jo-qp4-hotel {
    margin-bottom: 0;
}

.jo-qp4-for {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Il messaggio si appoggia sulla foto: è la prima cosa che si legge. */
.jo-qp4-letter {
    position: relative;
    z-index: 1;
    margin-top: -46px !important;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgb(22 22 42 / 12%);
}

.jo-qp4-letter p {
    max-width: 52rem;
    font-size: 14px;
}

/* Confronto: una colonna per soluzione, foto piccola, prezzo in evidenza. */

/* La soluzione: foto a sinistra, dettagli ordinati a destra. */
.jo-qp4-offer {
    grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
}

.jo-qp4-media {
    min-height: 100%;
}

.jo-qp4-body {
    gap: 14px;
    padding: 20px 22px;
}

.jo-qp4-body h3 {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

.jo-qp4-room {
    margin: 4px 0 0;
    font-size: 13px;
    color: #4a4a5c;
}

.jo-qp4-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.jo-qp4-chips span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f2ee;
    font-size: 11.5px;
    color: #4a4a5c;
}

.jo-qp4-body dl.jo-qp4-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 0;
    padding: 12px 0;
    border-block: 1px solid #efeee9;
}

.jo-qp4-body dl.jo-qp4-facts dt {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a9a;
}

.jo-qp4-body dl.jo-qp4-facts dd {
    margin: 1px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f2e;
}

.jo-qp4-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 10px 16px;
}

.jo-qp4-services span,
.jo-qp4-cond strong {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a9a;
}

.jo-qp4-services ul {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #4a4a5c;
}

.jo-qp4-services li {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.jo-qp4-services li.is-in {
    color: #2f6b3d;
}

.jo-qp4-services svg {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 2px;
}

.jo-qp4-cond p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b6b80;
}

.jo-qp4-cond p + p {
    margin-top: 4px;
}

.jo-qp4-choose {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 10px;
    background: var(--jo-brand);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.jo-qp4-choose.is-big {
    padding: 13px 30px;
    font-size: 15px;
}

/* Chiusura: validità, CTA, domande e contatti. */

.jo-qp4-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin-top: 8px !important;
    color: #1f1f2e !important;
}

.jo-qp4-contact span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jo-qp4-contact svg {
    width: 14px;
    height: 14px;
    color: #8a8a9a;
}

@media (max-width: 900px) {
    .jo-qp4-offer {
        grid-template-columns: 1fr;
    }

    .jo-qp4-media {
        min-height: 200px;
    }
}

/* Anteprima: i blocchi di contenuto come nella pagina vera (testo + immagine alternati). */
.jo-qp4-block {
    display: grid;
    align-items: center;
    gap: 18px;
    margin: 0 36px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #fff /* pagina del cliente: resta bianca anche in dark */;
}

.jo-qp4-block.has-img {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
}

.jo-qp4-block.has-img.flip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
}

.jo-qp4-block.flip img {
    order: 2;
}

.jo-qp4-block img {
    width: 100%;
    height: 170px;
    border-radius: 10px;
    object-fit: cover;
}

.jo-qp4-block h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

/* Costi e condizioni in una card come gli altri blocchi e come la pagina vera
 * (owner 2-nov-2026, «pixel perfect»: il testo partiva fuori allineamento). */
.jo-qp-conditions {
    padding: 18px 20px;
    border-radius: 14px;
    background: #fff /* pagina del cliente: resta bianca anche in dark */;
}

/* Anche Costi e condizioni (owner 2-nov-2026): prima a 16px, più grande del resto della pagina. */
.jo-qp4-block p,
.jo-qp-conditions p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #4a4a5c;
}

.jo-qp4-more span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.jo-qp4-more svg {
    width: 14px;
    height: 14px;
    color: #8a8a9a;
}

@media (max-width: 900px) {
    .jo-qp4-block,
    .jo-qp4-block.has-img,
    .jo-qp4-block.has-img.flip {
        grid-template-columns: 1fr;
        margin-inline: 16px;
    }

    .jo-qp4-block.flip img {
        order: 0;
    }
}

.jo-quote-pilot [data-jo-proposals] > ul > div > li.fi-fo-repeater-item > .fi-fo-repeater-item-content {
    padding: 12px 16px 16px !important;
}

/* Form di contatto: i campi e "Personalizza" con lo stesso linguaggio. */
html body .jo-qwiz .fi-section.jf-more:not(.jo-x) {
    background: var(--jo-ui-panel, #f6f6f9) !important;
}

/* ── Lead (mockup): Kanban della pipeline ── */

.jo-lb {
    padding: 14px;
}

.jo-lb-cols {
    display: grid;
    grid-auto-columns: minmax(15rem, 1fr);
    grid-auto-flow: column;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.jo-lb-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 14rem;
    padding: 10px;
    border-radius: 12px;
    background: var(--jo-ui-panel, var(--jo-ui-soft));
    transition: box-shadow 0.15s;
}

.jo-lb-col.is-over {
    box-shadow: inset 0 0 0 2px var(--jo-ui-accent);
}

.jo-lb-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 4px;
    font-size: 13px;
    color: var(--jo-ui-ink);
}

.jo-lb-bar {
    width: 4px;
    height: 16px;
    border-radius: 4px;
    background: var(--jo-ui-muted);
}

.jo-lb-bar--info { background: var(--jo-ui-info); }
.jo-lb-bar--warning { background: var(--jo-ui-warn); }
.jo-lb-bar--primary { background: var(--jo-ui-accent); }
.jo-lb-bar--success { background: var(--jo-ui-ok); }

.jo-lb-count {
    margin-left: auto;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--jo-ui-surface);
    font-size: 11.5px;
    color: var(--jo-ui-muted);
}

.jo-lb-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jo-lb-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 11px 12px;
    border-radius: 10px;
    background: var(--jo-ui-surface);
    box-shadow: 0 0 0 1px var(--ds-row-divider), var(--ds-shadow-rest);
    cursor: grab;
    font-size: 12.5px;
    color: var(--jo-ui-ink);
}

.jo-lb-card:hover {
    box-shadow: 0 0 0 1px var(--jo-ui-accent);
}

.jo-lb-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jo-lb-card-top .jo-cc-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.jo-lb-name {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-lb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.jo-lb-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--jo-ui-muted);
}

.jo-lb-contact span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jo-lb-contact svg {
    flex: none;
    width: 13px;
    height: 13px;
}

.jo-lb-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--jo-ui-line-2);
    font-size: 11.5px;
    color: var(--jo-ui-muted);
}

.jo-lb-empty {
    margin: 0;
    padding: 14px 6px;
    text-align: center;
    font-size: 12px;
    color: var(--jo-ui-muted);
}

.jo-lb-hint {
    margin: 8px 2px 0;
    font-size: 12px;
    color: var(--jo-ui-muted);
}

/* Ospiti: consensi sotto l'email, solo i canali con il consenso, nel
   colore del canale come in Inbox (email blu, WhatsApp verde). */
.jo-gc-icons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: 3px;
}

.jo-gc-ico {
    display: inline-flex;
    align-items: center;
    color: var(--ds-text-disabled);
}

.jo-gc-ico.is-on {
    color: var(--ds-ok-dot);
}

.jo-gc-ico .jo-ch-ic.is-email { color: var(--ds-brand-email, #0284C7); }
.jo-gc-ico .jo-ch-ic.is-whatsapp { color: var(--ds-brand-whatsapp, #25D366); }
.jo-gc-ico .jo-ch-ic, .jo-gc-ico .jo-ch-ic svg { width: 15px; height: 15px; }
.jo-gc-ico.is-bounced { color: var(--ds-err-dot); }
/* Consenso negato (disiscritto, STOP su WhatsApp): l'icona del canale in rosso (owner 3-nov-2026). */
.jo-gc-ico.is-denied { color: var(--ds-err-dot); }

/* ── KPI di pagina: un solo disegno (28-set) ───────────────────
 * Gli StatsOverviewWidget in testata (header widget) prendono lo stesso
 * aspetto dei .jo-kpi: bordo sottile, raggio 14px, icona in una tessera
 * tinta, etichetta piccola, valore leggibile, altezza uniforme. Così i KPI
 * sono uguali in tutta la piattaforma, che vengano da un widget Filament o
 * da un blade (.jo-kpis). Le dimensioni di base restano in compact-stats.css. */

.fi-page-header-widgets .fi-wi-stats-overview-stat {
    min-height: 76px;
    padding: 12px;
    border-radius: var(--jo-ui-radius);
    box-shadow: var(--ds-shadow-rest);
    --tw-ring-color: var(--jo-ui-line);
}

.fi-page-header-widgets .fi-wi-stats-overview-stat > .grid {
    gap: 8px;
}

.fi-page-header-widgets .fi-wi-stats-overview-stat-icon {
    box-sizing: content-box;
    width: 15px;
    height: 15px;
    padding: 5.5px;
    border-radius: 8px;
    background: var(--jo-ui-accent-soft);
    color: var(--jo-ui-accent);
}

.fi-page-header-widgets .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-label {
    font-size: 12px;
    color: var(--jo-ui-muted);
}

.fi-page-header-widgets .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--jo-ui-ink);
}

.fi-page-header-widgets .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-description {
    font-size: 12px;
}

/* Nota sotto il valore dei KPI (.jo-kpi, widget single-stat). */
.jo-kpi-note {
    margin-top: 4px;
    font-size: 12px;
    color: var(--jo-ui-muted);
}

/* Widget single-stat affiancati: la card riempie la cella della griglia. */
.jo-single-stat.jo-kpi {
    height: 100%;
}

/* KPI di testata su mobile: due per riga (una card alta per riga sprecava lo schermo). */
@media (max-width: 639px) {
    .fi-page-header-widgets .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Form di contatto, passo Aspetto: le scelte stanno nella colonna sinistra
   (l'anteprima a destra), quindi seguono la sua larghezza come una card
   stretta: 6 colonne, campi a metà o a un terzo. */
.jf-lp-main {
    container: jf-main / inline-size;
}

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

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

/* Nuova richiesta ▸ Richiedente: contatti già salvati e contatto nuovo (owner 5-ott-2026). */
.jo-rc {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jo-rc--picked {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-surface-sunken);
}

.jo-rc-ic svg {
    width: 20px;
    height: 20px;
    color: var(--ds-accent);
}

.jo-rc p {
    flex: 1;
    margin: 0;
    font-size: 13px;
    color: var(--ds-text-secondary);
}

.jo-rc p span {
    display: block;
    font-size: 12px;
    color: var(--ds-text-tertiary);
}

.jo-rc-link {
    font-size: 13px;
    color: var(--ds-accent);
}

/* "Nome e cognome" del Richiedente: elenco dei contatti salvati (owner 5-ott-2026). */
.jo-rqc {
    position: relative;
}

.jo-rqc-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-raised);
}

.jo-rqc-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1px 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    text-align: left;
}

.jo-rqc-item.is-active,
.jo-rqc-item:hover {
    background: var(--ds-accent-soft);
}

.jo-rqc-name {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ds-text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.jo-rqc-kind {
    align-self: center;
    font-size: 11.5px;
    color: var(--ds-text-tertiary);
}

.jo-rqc-kind.is-cliente {
    color: var(--ds-lime-fg);
}

.jo-rqc-kind.is-lead {
    color: var(--ds-accent);
}

.jo-rqc-line {
    grid-column: 1 / -1;
    overflow: hidden;
    font-size: 12px;
    color: var(--ds-text-tertiary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Sotto il nome, mentre si scrive: il contatto non è nel database dell'hotel (owner 29-ott-2026). */
.jo-rqc-new {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--ds-text-secondary);
}

.jo-rqc-new svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: var(--ds-accent);
}

.jo-rqc-foot {
    margin: 0;
    padding: 8px 10px;
    border-top: 1px solid var(--ds-row-divider);
    font-size: 12.5px;
    color: var(--ds-text-tertiary);
}

/* ── Accordion scritti a mano (<details class="jo-acc">), owner 5-ott-2026:
   stesso disegno degli accordion della piattaforma (card, titolo 600,
   descrizione di una riga, freccia a destra; aperta = bordo e testata lilla
   tenue con un filetto). ── */
details.jo-acc {
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-surface);
    box-shadow: var(--ds-shadow-rest);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}

details.jo-acc:not([open]):hover {
    border-color: var(--ds-border-strong);
    box-shadow: var(--ds-shadow-raised);
}

details.jo-acc[open] {
    border-color: var(--ds-step-current-bd);
}

details.jo-acc > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 14px;
    cursor: pointer;
    list-style: none;
}

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

details.jo-acc > summary::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px auto;
    border-right: 1.75px solid var(--ds-text-tertiary);
    border-bottom: 1.75px solid var(--ds-text-tertiary);
    transform: rotate(45deg);
    transition: transform .15s ease;
}

details.jo-acc[open] > summary {
    border-bottom: 1px solid var(--ds-step-current-bd);
    background: var(--ds-section-open-head);
}

details.jo-acc[open] > summary::after {
    margin-bottom: -4px;
    transform: rotate(-135deg);
}

.jo-acc-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ds-text-primary);
}

.jo-acc-title small {
    display: block;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--ds-text-tertiary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

details.jo-acc > :not(summary) {
    margin: 0;
    padding: 12px 14px 14px;
}

/* Changelog: le release restano righe della lista, con la stessa testata. */
.jo-cl-release > summary {
    align-items: center;
}

.jo-cl-release[open] > summary {
    border-bottom: 1px solid var(--ds-step-current-bd);
    background: var(--ds-section-open-head);
}

.jo-cl-release-title {
    font-size: 14px !important;
}
details.jo-acc > ol { padding-left: 32px; }

/* Form di contatto ▸ Dopo l'invio: a chi arriva l'avviso, modificabile in riga (owner 7-ott-2026). */
.jf-recipient { font-size: 13px; color: var(--ds-text-secondary, #3F3F46); }
/* Scelta a tessere con icona (owner 5-nov-2026: Obiettivo e «Come compare sul sito», affiancati),
   come le tessere «Aggiungi» dell'editor: icona viola e nome; la scelta col bordo viola e il fondo
   tenue, come il tema scelto. Piccole e alte uguali, si dividono la riga: niente buchi. */
html .fi-fo-toggle-buttons.jo-tiles { display: flex; flex-wrap: nowrap; gap: 8px; }
html .fi-fo-toggle-buttons.jo-tiles > div { display: flex; flex: 1 1 0; min-width: 0; }
html .fi-fo-toggle-buttons.jo-tiles .fi-btn { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-width: 0; min-height: 58px; padding: 5px 4px; border: 1px solid var(--ds-border, #D4D8E0); border-radius: 10px !important;
    background: var(--ds-surface, #F6F7F9) !important; box-shadow: none !important; font-size: 12px; font-weight: 500 !important; line-height: 1.1;
    color: var(--ds-text-secondary, #3F3F46) !important; text-align: center; white-space: normal; cursor: pointer; }
html .fi-fo-toggle-buttons.jo-tiles .fi-btn svg { width: 16px; height: 16px; margin: 0; color: var(--ds-accent, #7C5CCB) !important; }
html .fi-fo-toggle-buttons.jo-tiles .fi-btn:hover { border-color: var(--ds-accent, #7C5CCB); color: var(--ds-text-primary, #18181B) !important; }
html .fi-fo-toggle-buttons.jo-tiles input:checked + .fi-btn { border-color: var(--ds-accent, #7C5CCB); background: var(--ds-accent-soft, #F3EEFC) !important;
    color: var(--ds-text-primary, #18181B) !important; }
/* Senza il contorno scuro che il tema dà alle scelte non prese (form-standard.css). */
html:not(.dark) .fi-fo-toggle-buttons.jo-tiles input:not(:checked) + .fi-btn:not(.fi-btn-group .fi-btn) { box-shadow: none !important; }
html .fi-fo-toggle-buttons.jo-tiles input:focus-visible + .fi-btn { box-shadow: 0 0 0 3px var(--ds-focus-ring, rgba(124, 92, 203, .3)) !important; }
/* Il popup in una frase (owner 5-nov-2026, tavola «Pubblicazione · C»). */
.jf-when > .fi-fo-component-ctn { row-gap: 14px !important; }
/* Una frase da completare (App\Filament\Support\Sentence, owner 5-nov-2026): testo e tendine del
   browser larghe quanto la scelta, viola col filetto a puntini. Form, campagne, automazioni. */
.jo-sentence-line { margin: 0; font-size: 14.5px; line-height: 2; color: var(--ds-text-primary, #18181B); }
html .jo-sentence-pick { field-sizing: content; display: inline-block; height: auto; margin: 0; padding: 0 1px; border: 0; border-bottom: 1px dotted var(--ds-accent, #7400FF);
    border-radius: 0; background: transparent none; box-shadow: none; font: inherit; font-weight: 500; line-height: 1.4; color: var(--ds-accent-fg, #5E00D6);
    cursor: pointer; -webkit-appearance: none; appearance: none; }
html .jo-sentence-pick:hover { background: var(--ds-accent-soft, #F4ECFF); }
html .jo-sentence-pick:focus { outline: none; box-shadow: none; }
html .jo-sentence-pick:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px var(--ds-focus-ring, rgba(124, 92, 203, .3)); }
/* Scelta nella frase con più di otto voci (Elia 5-nov-2026, SelectSearch::THRESHOLD): al posto della
   tendina del browser un pannello con la ricerca che filtra le voci mentre si scrive, a gruppi
   (sentence.blade.php). Stessa parola viola col filetto; il pannello sulla superficie delle card. */
.jo-sentence-pick-wrap { position: relative; display: inline-block; }
html .jo-sentence-pick-btn { text-align: left; white-space: nowrap; }
html .jo-sentence-pick-btn::after { content: ' ▾'; font-size: .8em; opacity: .7; }
/* Posizionato da x-float (Filament) sotto il bottone; nessuna card lo taglia (le sezioni non hanno overflow). */
.jo-sentence-menu { display: block; position: absolute; z-index: 60; min-width: 260px; max-width: min(440px, 90vw); padding: 8px; border: 1px solid var(--ds-border, #DDE0E8); border-radius: var(--ds-radius-control, 10px); background: var(--ds-surface, #FCFCFD); box-shadow: var(--ds-shadow-raised, 0 12px 32px -12px rgba(20, 22, 40, .25)); }
.jo-sentence-search { display: block; width: 100%; margin: 0 0 6px; padding: 7px 10px; border: 1px solid var(--ds-border, #DDE0E8); border-radius: 8px; background: var(--ds-surface-sunken, #F3F4F8); font: inherit; font-size: 13.5px; line-height: 1.4; color: var(--ds-text-primary, #18181B); }
.jo-sentence-search:focus { outline: none; border-color: var(--ds-accent, #7400FF); box-shadow: 0 0 0 3px var(--ds-focus-ring, rgba(124, 92, 203, .3)); }
.jo-sentence-menu [role="listbox"] { display: block; max-height: 280px; margin: 0; padding: 0; overflow: auto; }
.jo-sentence-group { display: block; padding: 8px 8px 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-sentence-opt { display: block; padding: 6px 8px; border-radius: 6px; font-size: 13.5px; line-height: 1.4; color: var(--ds-text-primary, #18181B); cursor: pointer; }
.jo-sentence-opt:hover { background: var(--ds-surface-hover, #ECEEF3); }
.jo-sentence-opt[aria-selected="true"] { background: var(--ds-accent-soft, #F4ECFF); color: var(--ds-accent-fg, #5E00D6); font-weight: 500; }
.jo-sentence-empty { display: block; padding: 8px; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
.jf-inline-note { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ds-text-tertiary, #5B5B6B); }
/* Il codice da incollare nel sito in una riga, con l'icona per copiarlo (<x-jo.code-row>, owner
   5-nov-2026): form di contatto, widget chat, Shop online. Coi puntini, intero nel tooltip; un clic
   lo seleziona tutto. Accanto, l'etichetta (.jo-code-line). */
.jo-code-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jo-code-row pre { flex: 1; min-width: 0; margin: 0; padding: 8px 12px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 10px;
    background: var(--ds-surface-sunken, #F3F4F8); color: var(--ds-text-secondary, #3F3F46); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; user-select: all; }
.jo-code-row .jo-icon-btn { flex: none; }
.jo-code-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jo-code-line > .jo-code-label { flex: none; width: 128px; font-size: 13px; color: var(--ds-text-secondary, #3F3F46); }
.jo-code-line > .jo-code-row { flex: 1; }
.jo-code-link { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; text-decoration: underline; text-overflow: ellipsis; white-space: nowrap; }
.jo-code-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ds-text-tertiary, #5B5B6B); }
.jo-code-note code { font-size: 12px; }
/* Scheda del widget chat (ChatEmbedResource::sheetForm): i colori col loro
   pallino e il codice, le immagini in una miniatura alta quanto la riga. */
.jo-ce-swatch { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.jo-ce-swatch i { width: 16px; height: 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--ds-border); }
.jo-ce-thumb { display: block; max-width: 120px; max-height: 32px; object-fit: contain; border-radius: 6px; }
@media (max-width: 639px) { .jo-code-line { flex-wrap: wrap; } .jo-code-line > .jo-code-label { width: 100%; } }
.jf-recipient-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jf-recipient-row strong { color: var(--ds-text-primary, #18181B); font-weight: 600; word-break: break-all; }
.jf-recipient-ico { width: 16px; height: 16px; color: var(--ds-text-tertiary, #5B5B6B); }
.jf-recipient-label { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 500; color: var(--ds-text-secondary, #3F3F46); }
.jf-recipient-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jf-recipient-input { flex: 1 1 240px; max-width: 360px; height: 34px; padding: 0 10px; border: 1px solid var(--ds-border, #DFE2EA); border-radius: 8px; background: var(--ds-field-bg, #FEFEFF); color: var(--ds-text-primary, #18181B); font-size: 13.5px; }
.jf-recipient-input:focus { outline: none; border-color: var(--ds-accent, #7C5CCB); box-shadow: var(--ds-field-focus-halo, 0 0 0 3px rgb(124 92 203 / 18%)); }
.jf-recipient-note { margin: 6px 0 0; font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); }
.jf-recipient-error { margin: 4px 0 0; font-size: 12px; color: var(--ds-err-fg, #B42318); }
/* Privacy: informativa di JOORNA al posto di quella dell'hotel. */
.jf-policy-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--ds-warn-bd, #F5D9A8); border-radius: 8px; background: var(--ds-warn-bg, #FFF8EB); font-size: 13px; color: var(--ds-warn-fg, #8A5A00); }
.jf-policy-warn svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }

/* Amministrazione ▸ Connessioni ▸ Fatture in Cloud (revisione ott-2026): titolo
   e badge di stato vanno a capo sul telefono invece di tagliare il badge; il
   pulsante spento "Collega l'account" riceve il passaggio del mouse, così il
   tooltip dice perché è spento (Filament gli toglie i pointer-events). */
.jo-fic-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.jo-fic-head .jo-fic-badge { flex: none; white-space: nowrap; }
.fi-btn.jo-btn-off-reason { pointer-events: auto; cursor: not-allowed; }

/* Sistema ▸ Ticket IT: il modulo esterno largo come una colonna di form e alto
   quanto il modulo, così scorre la pagina e non il riquadro (segnalazione
   ClickUp 9-nov-2026: prima 620px e la cima tagliata). Altezze misurate il
   9-nov: ~1.230px dal computer, ~1.340px a 358px; in più il posto per gli
   errori dei campi obbligatori e gli allegati. */
.jo-ticket-intro { margin: 0; }
/* Al centro, avviso e modulo della stessa larghezza (owner 11-nov-2026: prima a sinistra). */
.jo-ticket-intro, .jo-embed.jo-embed--fit { width: 100%; max-width: 880px; margin-inline: auto; }
.jo-embed.jo-embed--fit iframe { height: 1360px; min-height: 0; }
@media (max-width: 640px) {
    .jo-embed.jo-embed--fit iframe { height: 1480px; }
}

/* Cataloghi ▸ Catalogo CTA (revisione ott-2026): in lista e in card un tassello
   coi colori del pulsante e l'etichetta in testo neutro, niente pill coi fondi
   accesi; sotto, se l'etichetta si ripete, la riga che distingue i pulsanti. */
.jo-cta-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.jo-cta-swatch {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 1px var(--ds-border, #DFE2EA);
}
.jo-cta-text { display: flex; flex-direction: column; min-width: 0; }
.jo-cta-label { font-size: 13.5px; font-weight: 600; color: var(--ds-text-primary, #18181B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jo-cta-sub { font-size: 12px; color: var(--ds-text-tertiary, #5B5B6B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sistema ▸ Plafond email (revisione ott-2026): il mese nella testata, a destra
   del titolo, dove le altre pagine di numeri hanno il periodo. */
.jo-header-month { min-width: 160px; }

/* Lista Lead ▸ «Da dove» (Elia, 5-nov-2026): i form compilati e i canali toccati, dai tag di provenienza (OriginTags). */
.jo-origin-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 280px; }
.jo-origin-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; max-width: 100%; padding: 0 6px 0 4px; border: 1px solid var(--ds-border, #DDE0E8); border-radius: 6px; background: var(--ds-surface-sunken, #F3F4F8); font-size: 11px; font-weight: 600; line-height: 18px; color: var(--ds-text-secondary, #3F3F46); white-space: nowrap; }
.jo-origin-chip.is-form { border-color: var(--ds-accent-soft, #E5D5FF); background: var(--ds-accent-soft, #F4ECFF); color: var(--ds-accent-fg, #5E00D6); }
.jo-origin-chip-icon { width: 13px; height: 13px; flex: none; }
.jo-origin-chip-text { overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
