/* ============================================================
   Listini
   ============================================================
   Foglio a se' e classi tutte prefissate `lst-`: smontare il modulo sara'
   cancellare un file. Solo token canonici di style-core.css, che ruotano gia'
   col tema.
   ============================================================ */

.lst-page {
    box-sizing: border-box;
    padding: 20px 24px 40px;
    color: var(--text-strong);
    font-family: var(--font-ui);
}

.lst-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.lst-header__titolo { display: flex; align-items: center; gap: 8px; }

/* La spiegazione sta dietro la «i» accanto al titolo: chi sa gia' come si usa la pagina non la vede. */
.lst-info {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lst-info:hover, .lst-info[aria-expanded="true"] { background: var(--surface-hover-soft); color: var(--accent); }
.lst-info:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.lst-title {
    margin: 0;
    font-family: var(--font-titolo);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lst-sub {
    margin: 5px 0 0;
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.lst-cerca {
    box-sizing: border-box;
    width: 320px;
    max-width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--panel-border-mid);
    border-radius: var(--radius-pill);
    background: var(--panel-bg);
    color: var(--text-strong);
    font: inherit;
    font-size: 0.88rem;
}
.lst-cerca:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }

.lst-body { margin-top: 18px; }
/* ── La barra: quale lista, quali terzisti, e il bottone che aggiunge ── */
.lst-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.lst-barra:empty { display: none; }
.lst-barra__aggiungi { margin-left: auto; }

.lst-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    background: var(--panel-soft);
}
.lst-seg--pieno { display: flex; }
.lst-seg--pieno .lst-seg__voce { flex: 1 1 0; }
.lst-seg__voce {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lst-seg__voce span { color: var(--text-tertiary); font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lst-seg__voce:hover { color: var(--text-strong); }
.lst-seg__voce:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lst-seg__voce.is-attiva { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--elev-1); }
.lst-seg__voce.is-attiva span { color: inherit; opacity: 0.85; }

.lst-terzisti-tasto { justify-content: center; }
.lst-terzisti-tasto b { color: var(--text-strong); font-weight: 700; }
.lst-terzisti-tasto__freccia { font-size: 0.66rem; color: var(--text-tertiary); transition: transform var(--mov-medio); }
.lst-terzisti-tasto[aria-expanded="true"] .lst-terzisti-tasto__freccia { transform: rotate(180deg); }

/* Il menu vive in fondo al body, fisso sotto il bottone: la pagina ha antenati che ritagliano cio' che ne esce. */
.lst-menu {
    position: fixed;
    z-index: 2000050;
    box-sizing: border-box;
    min-width: 280px;
    max-width: calc(100vw - 24px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: var(--panel-bg);
    box-shadow: var(--elev-4);
}
.lst-menu__voce {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 0.86rem;
    cursor: pointer;
}
.lst-menu__voce:hover { background: var(--surface-hover-soft); }
.lst-menu__voce--tutti { margin-bottom: 4px; border-bottom: 1px solid var(--panel-border); border-radius: 9px 9px 0 0; font-weight: 700; }
.lst-menu__nome { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lst-menu__link { color: var(--accent); font-size: 0.72rem; }
.lst-menu__voce small { color: var(--text-tertiary); font-size: 0.74rem; white-space: nowrap; }
.lst-menu__vuoto { margin: 0; padding: 10px; color: var(--text-secondary); font-size: 0.84rem; }

/* ── Il listino di ogni terzista scelto ── */
.lst-body { display: flex; flex-direction: column; gap: 22px; }
.lst-terzista-blocco__testa { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.lst-terzista-blocco__testa h2 { margin: 0; font-family: var(--font-titolo); font-size: 1.1rem; font-weight: 700; }
.lst-terzista-blocco__testa small { color: var(--text-tertiary); font-size: 0.78rem; }
.lst-vuoto--breve { padding: 18px 24px; }

.lst-gruppi { display: flex; flex-direction: column; gap: 12px; }
.lst-gruppo { border: 1px solid var(--card-border); border-radius: var(--radius-card); background: var(--card-surface); overflow: hidden; }
.lst-gruppo__testa {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
    grid-template-areas: "titolo fasce azione";
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
}
.lst-gruppo__testa > :nth-child(1) { grid-area: titolo; min-width: 0; }
.lst-gruppo__testa > :nth-child(2) { grid-area: fasce; min-width: 0; }
.lst-gruppo__testa > :nth-child(3) { grid-area: azione; justify-self: end; }
.lst-gruppo__testa h3 { margin: 0; font-size: 0.98rem; font-weight: 700; overflow-wrap: anywhere; }
.lst-gruppo__testa small { color: var(--text-tertiary); font-size: 0.78rem; }
.lst-gruppo__righe { border-top: 1px solid var(--panel-border); }
.lst-gruppo__righe summary { cursor: pointer; padding: 10px 16px; font-size: 0.78rem; color: var(--text-secondary); }
.lst-gruppo__righe summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.lst-gruppo__righe .lst-tabella-scroll { border: 0; border-top: 1px solid var(--panel-border); border-radius: 0; }
.lst-fascia--diversa { color: var(--text-secondary); font-size: 0.8rem; }
/* Sotto i 1100px le fasce vanno su una riga a parte, sotto titolo e bottone; sul telefono tutto in colonna. */
@media (max-width: 1100px) {
    .lst-gruppo__testa {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "titolo azione" "fasce fasce";
    }
}
@media (max-width: 760px) {
    .lst-barra > * { flex: 1 1 100%; }
    .lst-seg { display: flex; }
    .lst-seg .lst-seg__voce { flex: 1 1 0; }
    .lst-gruppo__testa {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "titolo" "fasce" "azione";
    }
    .lst-gruppo__testa > :nth-child(3) { justify-self: start; }
    .lst-barra__aggiungi { margin-left: 0; }
}

.lst-conto {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.lst-vuoto {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
    border: 1px dashed var(--panel-border-mid);
    border-radius: var(--radius-card);
}
.lst-vuoto strong { display: block; color: var(--text-strong); margin-bottom: 4px; }
.lst-vuoto--errore { color: var(--warning); }

/* ── Tabella ── */
.lst-tabella-scroll {
    overflow-x: auto;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    background: var(--card-surface);
}

.lst-tabella { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.lst-tabella th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--panel-border);
    white-space: nowrap;
}
.lst-tabella td {
    padding: 11px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--panel-border);
}
.lst-tabella tbody tr:last-child td { border-bottom: 0; }
.lst-tabella tbody tr:hover { background: var(--surface-hover-soft); }

.lst-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lst-azione { text-align: right; white-space: nowrap; }

.lst-articolo strong { display: block; font-weight: 600; }
.lst-articolo small { color: var(--text-tertiary); font-size: 0.76rem; }

.lst-pref {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--accent-wash);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
}

.lst-celle-fasce { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.lst-celle-fasce small { flex-basis: 100%; color: var(--text-tertiary); font-size: 0.72rem; }

.lst-fascia {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    padding: 3px 10px;
    border: 1px solid var(--panel-border-mid);
    border-radius: var(--radius-pill);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.lst-fascia i { font-style: normal; color: var(--text-secondary); font-size: 0.78rem; }
.lst-fascia b { font-weight: 700; }
.lst-fascia--sola { border-color: transparent; padding-left: 0; }

/* ── Bottoni ── */
/* Il bottone di Listini ha la forma e i colori di quello di tutta PROD (`.ui-btn`), col testo sempre al centro. */
.lst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--mov-veloce), color var(--mov-veloce), box-shadow var(--mov-veloce);
}
.lst-btn:hover { background: var(--surface-hover-soft); color: var(--text-strong); border-color: var(--accent-wash); box-shadow: var(--elev-1); }
.lst-btn:focus-visible, .lst-btn-icona:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lst-btn:disabled { opacity: 0.5; cursor: default; }
.lst-btn--primario { background: var(--accent); border-color: transparent; color: var(--accent-contrast); box-shadow: var(--elev-1); }
.lst-btn--primario:hover { background: var(--accent-strong); color: var(--accent-contrast); border-color: transparent; box-shadow: var(--elev-2); }
.lst-btn--pericolo { margin-right: auto; background: color-mix(in srgb, var(--error) 12%, transparent); border-color: color-mix(in srgb, var(--error) 34%, transparent); color: var(--error); }
.lst-btn--pericolo:hover { background: color-mix(in srgb, var(--error) 20%, transparent); color: var(--error); border-color: color-mix(in srgb, var(--error) 34%, transparent); }
/* Un bottone dentro una colonna non si allunga a tutta la riga: ha la larghezza del suo testo. */
.lst-btn--fascia { align-self: flex-start; }
.lst-page .ui-btn, .lst-velo .ui-btn { justify-content: center; text-align: center; }

.lst-btn-icona {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lst-btn-icona:hover { background: var(--surface-hover-soft); color: var(--text-strong); }

/* ── Il modale delle fasce ──
   Un velo che NON chiude al clic: si esce dalla X o da «Annulla». */
.lst-velo {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 8, 12, 0.55);
}

.lst-modale {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 560px;
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px 24px 20px;
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    background: var(--panel-bg);
    color: var(--text-strong);
    box-shadow: var(--elev-2);
    animation: mov-modale var(--mov-lento) var(--ease-enter) both;
}

.lst-modale--larga { width: 680px; }
.lst-coppia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.lst-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lst-campo__t { font-size: 0.74rem; font-weight: 600; color: var(--text-secondary); }
.lst-campo .oe-dd { width: 100%; }
.lst-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-surface);
    color: var(--text-strong);
    font: inherit;
}
.lst-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.lst-riepilogo { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-hover-soft); font-size: 0.84rem; line-height: 1.5; }
.lst-riepilogo--muto { color: var(--text-secondary); }
.lst-riepilogo--errore { color: var(--warning); }
@media (max-width: 560px) { .lst-coppia { grid-template-columns: minmax(0, 1fr); } }

.lst-modale__testa { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lst-modale__testa h2 { margin: 0; font-family: var(--font-titolo); font-size: 1.15rem; font-weight: 700; }
.lst-modale__testa p { margin: 3px 0 0; font-size: 0.82rem; color: var(--text-secondary); }

.lst-modale__corpo { display: flex; flex-direction: column; gap: 10px; }
.lst-prezzi { display: flex; flex-direction: column; gap: 10px; }
/* Ridisegnare la finestra dopo una scelta non rifa' l'ingresso: sembrerebbe un ricaricamento. */
.lst-velo.is-ridisegnato .lst-modale { animation: none; }
.lst-campo__t small { margin-left: 6px; color: var(--text-tertiary); font-weight: 600; }

/* ── Il magazzino come albero da cui spuntare ── */
.lst-albero { border: 1px solid var(--card-border); border-radius: 12px; background: var(--card-surface); overflow: hidden; }
.lst-albero__cerca {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-bottom: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-size: 0.86rem;
}
.lst-albero__cerca:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-wash); }
.lst-albero__lista { max-height: 280px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.lst-nodo { --liv: 0; }
.lst-nodo__riga { display: flex; align-items: center; gap: 4px; padding-left: calc(var(--liv) * 18px); }
.lst-nodo__apri {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    cursor: pointer;
}
.lst-nodo__apri:hover { background: var(--surface-hover-soft); color: var(--text-strong); }
.lst-nodo__apri i { transition: transform var(--mov-veloce); }
.lst-nodo__apri.is-aperta i { transform: rotate(90deg); }
.lst-nodo__scelta { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; padding: 6px 8px; border-radius: 8px; font-size: 0.86rem; cursor: pointer; }
.lst-nodo__scelta:hover, .lst-art:hover { background: var(--surface-hover-soft); }
.lst-nodo__scelta b { font-weight: 700; overflow-wrap: anywhere; }
.lst-nodo__scelta small { color: var(--text-tertiary); font-size: 0.74rem; white-space: nowrap; }
.lst-art { --liv: 0; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px calc(var(--liv) * 18px + 34px); border-radius: 8px; font-size: 0.82rem; cursor: pointer; }
.lst-art__codice { font-family: ui-monospace, monospace; font-size: 0.76rem; color: var(--text-secondary); white-space: nowrap; }
.lst-art__nome { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.lst-art__gia { font-style: normal; font-size: 0.7rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
.lv-uff { white-space: nowrap; }

.lst-mfascia { display: flex; align-items: flex-end; gap: 8px; }
.lst-mfascia label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 0;
    min-width: 0;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.lst-mfascia input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--panel-border-mid);
    border-radius: 12px;
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}
.lst-mfascia input:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.lst-mfascia__unita { padding-bottom: 11px; font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.lst-mfascia .lst-btn-icona { margin-bottom: 3px; }
.lst-mfascia--prima label { flex: 0 1 220px; }

#lst-fasce { display: flex; flex-direction: column; gap: 10px; }

.lst-anteprima {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-hover-soft);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}
.lst-anteprima i { font-style: normal; color: var(--text-secondary); margin-right: 4px; }
.lst-anteprima--muta { color: var(--text-secondary); line-height: 1.5; }

.lst-errore { min-height: 1.2em; margin: 0; font-size: 0.82rem; color: var(--warning); }

.lst-modale__piede {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--card-border);
}

@media (max-width: 640px) {
    .lst-page { padding: 14px 16px 32px; }
    .lst-cerca { width: 100%; }
    .lst-mfascia { flex-wrap: wrap; }
    .lst-modale { padding: 18px 16px 16px; }
}

/* ============================================================
   Cataloghi dei fornitori (prefisso lc-)
   ============================================================ */

.lc-page { max-width: 1480px; }

/* ── Da dove si parte: le categorie ── */
.lc-categorie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 22px;
}
.lc-cat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 20px 22px;
    border: 1px solid var(--panel-border-mid);
    border-radius: var(--radius-card);
    background: var(--card-surface);
    color: var(--text-strong);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lc-cat:hover { border-color: var(--accent); background: var(--accent-wash); }
.lc-cat:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lc-cat i { font-size: 1.3rem; color: var(--accent); margin-bottom: 6px; }
.lc-cat strong { font-family: var(--font-titolo); font-size: 1.15rem; font-weight: 700; }
.lc-cat span { font-size: 0.82rem; color: var(--text-secondary); }
.lc-cat.is-vuota span { color: var(--text-tertiary); }
.lc-cat.is-da-smistare { border-color: var(--warning); }
.lc-cat.is-da-smistare i { color: var(--warning); }

.lc-testa-azioni { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Le righe spuntate: la barra resta in vista mentre si scorre la tabella */
.lc-azioni {
    position: sticky;
    top: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-card);
    background: var(--card-surface);
}
.lc-azioni .oe-dd-wrap { min-width: 200px; }
.lc-tabella .lc-spunta { width: 36px; padding-right: 0; }
.lc-tabella .lc-motivo, .lc-tabella .lc-proposta { color: var(--text-secondary); }

.lc-indietro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}
.lc-indietro:hover { color: var(--text-strong); }
.lc-indietro:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* ── I listini caricati ── */
.lc-fonti { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lc-fonte {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px 5px 12px;
    border: 1px solid var(--panel-border-mid);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
}
.lc-fonte b { font-weight: 700; }
/* Nella finestra dei listini caricati: uno per riga */
.lc-modale .lc-fonti { flex-direction: column; align-items: stretch; margin-top: 0; }
.lc-modale .lc-fonte { flex-wrap: wrap; padding: 8px 10px 8px 12px; border-radius: 12px; }
.lc-fonte span { color: var(--text-secondary); }
.lc-fonte__possibile {
    font-style: normal;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-hover-soft);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
}
.lc-fonte__prov {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px;
    border: 1px solid var(--panel-border-mid);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}
.lc-fonte__prov i { font-size: 0.55rem; color: var(--text-tertiary); }
.lc-fonte__prov.is-da-dire { border-style: dashed; color: var(--warning); }
.lc-fonte__prov:hover { background: var(--surface-hover-soft); }
.lc-fonte__prov:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lc-fonte__togli {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lc-fonte__togli:hover { background: var(--surface-hover-soft); color: var(--text-strong); }
.lc-fonte__togli:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ── La ricerca: filtri a sinistra, prodotti a destra ── */
/* I filtri stanno in una barra sopra la tabella, e la tabella ha tutta la larghezza della pagina */
.lc-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

/* Una sezione con prodotti di piu' schede: una pastiglia per scheda, con quante righe ha */
.lc-schede { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-scheda {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-surface);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}
.lc-scheda span { font-weight: 500; color: var(--text-tertiary); }
.lc-scheda:hover { border-color: var(--accent); }
.lc-scheda:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lc-scheda.is-attiva { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); }

/* Una griglia a otto colonne uguali dentro un riquadro: ogni filtro e' una cella con il suo titolo sopra,
   e tutti i campi hanno la stessa altezza e lo stesso raggio. La ricerca prende due celle, l'azzeramento
   l'ultima in basso a destra. */
.lc-filtri {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px 16px;
    padding: 16px 18px 18px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    background: var(--card-surface);
}
#lc-filtri-corpo { display: contents; }

.lc-filtro { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc-filtro--cerca { grid-column: span 2; }
.lc-filtro--azzera { grid-column: -2 / -1; justify-content: flex-end; }
.lc-filtro--azzera .lst-btn { width: 100%; min-height: 40px; justify-content: center; }
.lc-filtro__t { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.lc-filtro__t i { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-tertiary); }
.lc-filtro.is-acceso .lc-filtro__t { color: var(--accent); }
.lc-filtro .oe-dd { width: 100%; }
.lc-filtro .oe-dd-trigger { min-height: 40px; border-radius: 12px; }

.lc-cerca { width: 100%; min-height: 40px; border-radius: 12px; }

.lc-intervallo { display: flex; gap: 8px; }
.lc-intervallo input {
    box-sizing: border-box;
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--panel-border-mid);
    border-radius: 12px;
    background: var(--panel-bg);
    color: var(--text-strong);
    font: inherit;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.lc-intervallo input::placeholder { color: var(--text-tertiary); }
.lc-intervallo input:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }

.lc-risultati { min-width: 0; }
.lc-tabella { font-size: 0.82rem; width: 100%; }
.lc-tabella td, .lc-tabella th { padding: 7px 8px; white-space: nowrap; }
.lc-tabella .lc-descrizione { white-space: normal; min-width: 200px; max-width: 320px; color: var(--text-secondary); }
.lc-tabella .lc-codice { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; white-space: normal; overflow-wrap: anywhere; max-width: 170px; }
.lc-tabella .lc-prezzo { font-weight: 700; }
/* Le colonne dei numeri sono centrate, titolo e valori sullo stesso asse */
.lc-tabella th.lst-num, .lc-tabella td.lst-num { text-align: center; }
/* Il fornitore e i testi lunghi nelle celle dei numeri non allargano la tabella: il nome intero sta nel suggerimento */
.lc-tabella .lc-fornitore { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.lc-tabella td.lst-num { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.lc-tabella td.lc-testo-breve { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* La tabella scorre nel suo riquadro, in orizzontale e in verticale: la barra sta sempre in vista, non in fondo a mille righe, e i titoli restano */
.lc-risultati .lst-tabella-scroll { max-height: calc(100vh - 330px); overflow: auto; }
.lc-tabella thead th { position: sticky; top: 0; z-index: 2; background: var(--card-surface); }
.lc-tabella tr.is-piu-basso td { background: var(--accent-wash); }
.lc-ordina {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}
.lc-ordina:hover { color: var(--text-strong); }
.lc-ordina:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.lc-tabella th.is-ordine { color: var(--text-strong); }
.lc-altri { margin-top: 12px; }

.lc-vuoto__azione { margin-top: 14px; }

/* ── La finestra «Carica un listino» ── */
.lc-modale { width: 600px; }
.lc-campo { display: flex; flex-direction: column; gap: 6px; }
.lc-campo__t { font-size: 0.74rem; font-weight: 600; color: var(--text-secondary); }
.lc-campo__aiuto { font-size: 0.74rem; line-height: 1.4; color: var(--text-tertiary); }

.lc-zona {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    border: 2px dashed var(--panel-border-mid);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lc-zona i { font-size: 1.5rem; color: var(--accent); }
.lc-zona span { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-zona small { color: var(--text-tertiary); font-size: 0.74rem; }
.lc-zona:hover, .lc-zona.is-sopra { border-color: var(--accent); background: var(--accent-wash); }
.lc-zona.ha-file { padding: 12px 16px; flex-direction: row; justify-content: center; gap: 10px; border-style: solid; }
.lc-zona.ha-file i { font-size: 1.1rem; }
.lc-zona.ha-file small { margin-left: 4px; }

.lc-lettura { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-hover-soft); font-size: 0.84rem; line-height: 1.5; }
.lc-lettura p { margin: 0 0 6px; }
.lc-lettura--errore { color: var(--warning); }
.lc-lettura--ok .fa-circle-check { color: var(--success); }
.lc-avviso { color: var(--text-secondary); font-size: 0.8rem; }
.lc-avviso__voce { margin: 0 0 8px; }
.lc-avviso__voce:last-child { margin-bottom: 0; }
.lc-dettaglio { margin-top: 4px; }
.lc-dettaglio summary { cursor: pointer; color: var(--text-secondary); }
.lc-dettaglio summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.lc-dettaglio ul { margin: 6px 0 0; padding-left: 18px; max-height: 180px; overflow-y: auto; }
.lc-dettaglio p { margin: 6px 0 0; }
.lc-colonne summary { cursor: pointer; font-size: 0.78rem; color: var(--text-secondary); }
.lc-colonne summary:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.lc-prov { display: flex; gap: 8px; }
.lc-prov__voce {
    flex: 1 1 0;
    min-height: 40px;
    border: 1px solid var(--panel-border-mid);
    border-radius: 12px;
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transizione-controllo);
}
.lc-prov__voce:hover { background: var(--surface-hover-soft); }
.lc-prov__voce:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lc-prov__voce.is-scelta { border-color: var(--accent); background: var(--accent-wash); color: var(--accent); }

@media (max-width: 1100px) {
    .lc-filtri { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .lc-filtri { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lc-filtro--cerca { grid-column: 1 / -1; }
}

/* ── Colonne scelte a mano, cambio, modello ── */
.lc-colonne__guida { margin: 8px 0 0; font-size: 0.76rem; line-height: 1.4; color: var(--text-tertiary); }
.lc-colonne-mano { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 320px; overflow-y: auto; }
.lc-colonna { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--card-surface); }
.lc-colonna__file { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-colonna__file b { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-colonna__file span { font-size: 0.74rem; line-height: 1.35; color: var(--text-tertiary); overflow-wrap: anywhere; }
.lc-colonna__ruolo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc-colonna .oe-dd { width: 100%; }
.lc-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.lc-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.lc-prezzo-info {
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--accent-wash);
    font-size: 0.82rem;
    line-height: 1.5;
}
.lc-prezzo-info p { margin: 0 0 4px; }

.lc-modello {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: underline;
    cursor: pointer;
}
.lc-modello:hover { color: var(--text-strong); }
.lc-modello:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

/* ── Listini › Vendita ── */
.lv-listini { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lv-listino {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-surface);
    color: var(--text-strong);
    font: inherit;
    cursor: pointer;
}
.lv-listino span { font-size: 0.78rem; color: var(--text-tertiary); }
.lv-listino:hover { border-color: var(--accent); }
.lv-listino:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.lv-listino.is-attivo { border-color: var(--accent); background: var(--accent-wash); }
.lv-testa-gruppo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.lv-azioni-gruppo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lv-ufficiale { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 700; color: var(--success); }
.lv-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.lv-barra__testo { margin: 0; font-size: 0.88rem; color: var(--text-secondary); }
.lv-barra__testo b { color: var(--text-strong); }
.lv-barra__stato { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--text-tertiary); }
.lv-barra__azioni { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-filtri { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lv-cerca { width: 100%; max-width: 420px; }
.lv-scroll { max-height: calc(100vh - 360px); overflow: auto; }
.lv-tabella thead th { position: sticky; top: 0; z-index: 1; background: var(--card-surface); }
.lv-codice { font-family: ui-monospace, monospace; font-size: 0.8rem; white-space: nowrap; }
.lv-desc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.lv-formula { display: block; color: var(--text-tertiary); font-size: 0.74rem; font-weight: 400; white-space: nowrap; }
.lv-articolo { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-sotto { display: block; color: var(--text-tertiary); font-size: 0.74rem; }
.lv-riga-clic { cursor: pointer; }
.lv-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.84rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.lv-link:hover { color: var(--text-strong); }
.lv-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.lv-barra__link { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 0; }
.lv-barra__testo p { margin: 0; }
.lv-avvisi { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; }
.lv-avviso { font-style: normal; font-size: 0.74rem; font-weight: 600; color: var(--warning); }
.lv-avviso--prezzo { color: var(--accent); }
.lv-avviso--ok { color: var(--success); }
.lv-ricerca { margin-top: 18px; }
.lv-guida { margin: 14px 0 0; font-size: 0.86rem; color: var(--text-secondary); }
.lv-titolo-gruppo { margin: 6px 0 0; font-family: var(--font-titolo); font-size: 1.3rem; font-weight: 700; }
.lv-titolo-gruppo span { font-size: 0.84rem; font-weight: 500; color: var(--text-tertiary); margin-left: 8px; }
.lv-listini .lv-link { align-self: center; margin-left: 4px; }
.lv-senza { color: var(--text-tertiary); font-size: 0.8rem; }
.lv-collega { padding: 3px 10px; font-size: 0.78rem; }
.lv-prezzo-in {
    box-sizing: border-box;
    width: 96px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.lv-prezzo-in:hover { border-color: var(--card-border); }
.lv-prezzo-in:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); background: var(--card-surface); }
.lv-formula-prezzo { font-weight: 700; }
.lv-prezzo-articolo { color: var(--text-secondary); }
.lv-diff { font-size: 0.8rem; font-weight: 600; }
.lv-diff--uguale { color: var(--text-tertiary); }
.lv-diff--sale { color: var(--success); }
.lv-diff--scende { color: var(--error); }
.lv-modale--larga { width: 680px; }
.lv-campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lv-campo__t { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.lv-campo small { font-size: 0.76rem; color: var(--text-tertiary); }
.lv-coppia { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lv-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--card-surface);
    color: var(--text-strong);
    font: inherit;
}
.lv-input--corto { max-width: 140px; }
.lv-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.lv-modo { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-articolo-campo { min-width: 0; }
.lv-elimina { align-self: flex-start; color: var(--error); }
.lv-spazio { flex: 1; }
.lv-riepilogo { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.lv-foglio { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--card-border); border-radius: 12px; }
.lv-foglio p { margin: 0; font-size: 0.86rem; color: var(--text-secondary); }
.lv-foglio p b { color: var(--text-strong); }
.lv-foglio.is-no { flex-direction: row; justify-content: space-between; gap: 12px; color: var(--text-tertiary); font-size: 0.84rem; }
@media (max-width: 640px) {
    .lv-coppia { grid-template-columns: 1fr; }
    .lv-modale--larga { width: 100%; }
}

/* Telefono: il titolo e le card della home seguono la scala delle altre pagine. */
@media (max-width: 768px) {
    .lst-title { font-size: 1.15rem; }
    .lc-cat { padding: 14px 16px; }
    .lc-zona { padding: 14px 12px; }
}
.lv-nota { color: var(--warning); font-weight: 600; white-space: normal; }
.lv-usa-proposto { align-self: flex-start; }
