/* ===== MiaGestione Lista =====
   Si aggiunge a tokens.css e app.css di MiaGestione: stessi colori, spazi e componenti.
   Il colore dell'app (--app-lista) solo per il simbolo; i comandi restano nel blu del marchio. */

.simbolo-lista {
    width: 28px; height: 28px; flex: none; border-radius: var(--radius-icon);
    background: var(--app-lista, #c2410c); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.app-lista .topbar .simbolo-lista { box-shadow: 0 0 0 2px rgba(255, 255, 255, .3); }
.barrato { text-decoration: line-through; color: var(--ink-muted); }
.centrato { text-align: center; }
.stack-stretto { display: flex; flex-direction: column; gap: var(--space-2); }
.btn-alto { min-height: 52px; font-size: 16px; }
.btn-tenue { min-height: 36px; padding: 0 12px; border: 0; background: var(--brand-soft); color: var(--brand-strong); font-size: 13px; font-weight: 600; }
.btn-tenue:hover { background: var(--brand-soft); color: var(--brand); }

/* ----- Aggiungi ----- */
.aggiungi-lista {
    padding: var(--space-4); display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3);
    overflow: visible;
}
.aggiungi-nome { flex: 2 1 220px; }
.aggiungi-nota { flex: 2 1 220px; }
.aggiungi-btn { min-height: 44px; }
.aggiungi-aiuto { flex-basis: 100%; margin: 0; }
.proposte { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.proposte .chip:disabled { opacity: .55; cursor: default; }

/* ----- Colonne ----- */
.lista-colonne { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.lista-principale { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.lista-laterale { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.lista-laterale:empty { display: none; }

/* ----- Reparti e voci ----- */
.reparti { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); align-items: start; }
.reparto { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.reparto-nome { margin: 0 4px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.voci { list-style: none; margin: 0; padding: 0; }
.voce { display: flex; align-items: center; gap: var(--space-2); padding: 4px 12px 4px 4px; min-height: 56px; border-top: 1px solid var(--line); }
.voce:first-child { border-top: 0; }
.voce.nuova { background: var(--brand-soft); }
.spunta {
    width: 44px; height: 44px; flex: none; border: 0; background: none; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-pill);
}
.cerchio { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line-strong); box-sizing: border-box; transition: background .15s; }
.spunta:hover .cerchio { background: var(--success-soft); border-color: var(--success); }
.voce-testo {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
    background: none; border: 0; padding: 6px 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.voce-testo.statico { cursor: default; padding-left: var(--space-3); }
.voce-nome { font-size: 16px; line-height: 22px; font-weight: 500; }
.voce-dettaglio { font-size: 13px; line-height: 18px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.badge-nuova { flex: none; font-size: 12px; font-weight: 500; color: var(--brand-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 2px 8px; }
.lista-vuota { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); color: var(--ink-muted); }
.lista-vuota strong { color: var(--ink); }
.lista-vuota p { margin: 0; }

/* ----- Suggerimenti ----- */
.forse-serve { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.fs-testa { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.fs-testa h2 { font-size: 16px; line-height: 24px; margin: 0; }
.fs-elenco { list-style: none; margin: 0; padding: 0; }
.fs-elenco li { display: flex; align-items: center; gap: var(--space-2); padding-top: var(--space-2); margin-top: var(--space-2); border-top: 1px solid var(--line); }
.fs-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fs-nome { font-size: 15px; font-weight: 500; }
.fs-non-ora { color: var(--ink-muted); text-decoration: none; min-height: 44px; }

/* ----- Carrello ----- */
.carrello-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.carrello-mini li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.cerchio-ok {
    width: 20px; height: 20px; flex: none; border-radius: 999px; background: var(--success); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.cerchio-ok.grande { width: 24px; height: 24px; margin-left: 10px; }
.carrello-colonne { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.carrello-colonne > .stack { flex: 999 1 420px; min-width: 0; }
.registra-box { flex: 1 1 280px; display: flex; flex-direction: column; gap: var(--space-2); }
.nota-privacy {
    display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--success-soft); color: var(--ink); font-size: 14px; line-height: 20px;
}
.nota-privacy .icona { color: var(--success); flex: none; }
.anteprima-spesa { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.anteprima-spesa .num { white-space: nowrap; }

/* ----- Prodotti ----- */
.voce.prodotto { padding-right: 8px; flex-wrap: wrap; }
.select-reparto { max-width: 170px; min-height: 40px; }
.rinomina { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; width: 100%; padding: 6px 8px; }
.rinomina input { flex: 1 1 180px; }
.app-lista .content > .reparto + .reparto { margin-top: var(--space-2); }

/* ----- Barra del carrello (smartphone) ----- */
.barra-carrello {
    position: fixed; left: var(--space-4); right: var(--space-4); z-index: 25;
    bottom: calc(68px + env(safe-area-inset-bottom) + 12px);
    min-height: 52px; padding: 0 var(--space-4); border-radius: var(--radius-lg);
    background: var(--ink); color: var(--surface); text-decoration: none;
    align-items: center; gap: 10px; box-shadow: 0 6px 16px rgba(24, 24, 27, .25);
}
.barra-carrello:hover { color: var(--surface); }
.barra-carrello-testo { flex: 1; font-size: 15px; font-weight: 600; }
.barra-carrello-azione { font-size: 13px; opacity: .85; }

@media (max-width: 900px) {
    .barra-carrello.solo-mobile { display: flex !important; }
    .forse-serve.solo-mobile, .lista-vuota { display: flex !important; }
    .app-lista .content { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
    .aggiungi-lista { flex-wrap: nowrap; padding: var(--space-3); }
    .aggiungi-lista .aggiungi-nome label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .aggiungi-lista .aggiungi-btn { width: 44px; padding: 0; flex: none; }
    .aggiungi-lista .proposte { flex-wrap: nowrap; overflow-x: auto; }
    .aggiungi-lista { flex-wrap: wrap; }
    .aggiungi-nome { flex: 1 1 0; }
    .reparti { grid-template-columns: minmax(0, 1fr); }
    .lista-laterale { display: none; }
    .registra-box { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom) + 8px); background: var(--page, var(--surface-alt)); padding-top: var(--space-2); }
    .select-reparto { max-width: none; flex: 1 1 140px; }
}
