/* MY AI NOW · Costi evento e commesse (13/11/2026) */
.bi-balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin-top: 1.25rem; }
.bi-box { background: var(--white); border: 1px solid var(--ink-line); border-radius: 14px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.bi-box span { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 700; }
.bi-box strong { font-size: var(--t-l); font-weight: 800; }
.bi-box small { font-size: var(--t-xs); color: var(--ink-soft); }
.bi-box.pos strong { color: var(--lime-deep); }
.bi-box.neg strong, .bi-tab .neg, .bi-calcolo .neg { color: var(--magenta-deep); }
.bi-tab .num, .bi-calcolo .num { text-align: right; white-space: nowrap; }
.bi-riga { cursor: pointer; }
.bi-riga:hover td { background: var(--paper-2); }
.bi-annullata td { opacity: 0.55; }
.bi-sub-riga td:first-child { padding-left: 1.5rem; }
.bi-tot td { font-weight: 800; border-top: 2px solid var(--ink-line); }
.bi-tag { color: var(--magenta-deep); font-weight: 700; }
.bi-link { font: inherit; font-size: var(--t-xs); background: none; border: 0; padding: 0; color: var(--magenta-deep); text-decoration: underline; cursor: pointer; }
.bi-barra { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.bi-barra select { font: inherit; border: 2px solid var(--ink-line); border-radius: 12px; padding: 0.45rem 0.7rem; background: var(--paper); }
.bi-editor { margin: 1rem 0 1.5rem; }
.bi-editor h3 { font-size: var(--t-m, 1rem); font-weight: 800; margin: 0.5rem 0; }
.bi-fatt summary { cursor: pointer; font-weight: 700; padding: 0.4rem 0; }
.bi-sub { margin-top: 0.75rem; }
.bi-linea { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.bi-linea input, .bi-linea select { font: inherit; border: 2px solid var(--ink-line); border-radius: 10px; padding: 0.45rem 0.6rem; background: var(--paper); min-width: 0; }
.bi-linea input[data-k="descrizione"] { flex: 1 1 14rem; }
.bi-linea .bi-num { width: 7.5rem; }
.bi-linea .my-check { font-size: var(--t-xs); }
.bi-risultati { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.4rem; }
.bi-ris { font: inherit; text-align: left; background: var(--white); border: 1px solid var(--ink-line); border-radius: 10px; padding: 0.5rem 0.7rem; cursor: pointer; }
.bi-ris small { color: var(--ink-soft); }
.bi-collegato { font-size: var(--t-s); margin-bottom: 0.4rem; }
.bi-calcolo table { max-width: 32rem; }
@media (max-width: 40rem) { .bi-linea .bi-num { width: 6rem; } }
.bi-listino td { vertical-align: middle; }
.bi-listino input.bi-num { width: 5.5rem; min-width: 0; font: inherit; border: 2px solid var(--ink-line); border-radius: 10px; padding: 0.35rem 0.5rem; background: var(--paper); }
.bi-listino select, .bi-barra input { font: inherit; border: 2px solid var(--ink-line); border-radius: 10px; padding: 0.35rem 0.5rem; background: var(--paper); }
.bi-ric { white-space: nowrap; }
.bi-azioni { white-space: nowrap; }
.bi-desc { color: var(--ink-soft); }
.bi-arredo { list-style: none; padding: 0; margin: 0 0 0.5rem; display: grid; gap: 0.3rem; font-size: var(--t-s); }
.bi-arredo small { color: var(--ink-soft); }
.bi-art { max-width: 22rem; }
.bi-listino { font-size: var(--t-sm, 0.9rem); }
.bi-listino th, .bi-listino td { padding-left: 0.4rem; padding-right: 0.4rem; }
.bi-listino td:first-child { min-width: 12rem; max-width: 18rem; }
.bi-listino .bi-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* pagina intera (13/11/2026): niente menu laterale e tutta la larghezza, cosi' le tabelle non scorrono di lato */
body.bi-pieno .contenitore.my-app { width: calc(100% - 2 * var(--gutter)); max-width: none; }
body.bi-pieno .my-layout, body.bi-pieno .my-layout.ridotto { grid-template-columns: minmax(0, 1fr); }
body.bi-pieno .my-nav, body.bi-pieno .my-menu-btn, body.bi-pieno .my-nav-riduci { display: none !important; }
.bi-btn-pieno { margin-bottom: 0.75rem; }
/* riga da cui si era aperta la scheda, evidenziata al ritorno */
.bi-tab tr.bi-evid td { background: color-mix(in srgb, var(--magenta-deep) 14%, transparent); transition: background 0.4s; }
@media (max-width: 1100px) { .bi-listino td:first-child { min-width: 8rem; } .bi-listino input.bi-num { width: 4.5rem; } }

/* foto (13/11/2026): pulsante accanto al codice e riquadro con l'immagine */
.bi-foto { font-size: 0.85rem; line-height: 1; background: none; border: 1px solid var(--ink-line); border-radius: 8px; padding: 0.15rem 0.3rem; cursor: pointer; vertical-align: middle; }
.bi-foto:hover, .bi-foto:focus-visible { border-color: var(--magenta-deep); }
.bi-foto-pop { position: absolute; z-index: 1000; background: var(--white); border: 1px solid var(--ink-line); border-radius: 14px; padding: 0.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.bi-foto-pop img { display: block; width: 100%; max-height: 240px; object-fit: contain; border-radius: 10px; background: var(--paper); }
.bi-foto-pop p { margin: 0.35rem 0 0; font-size: var(--t-xs); text-align: center; color: var(--ink-soft); }
.bi-foto-pop .bi-foto-no { margin: 0.4rem; }

/* fisarmonica, selezione, dettaglio e storico (13/11/2026) */
.bi-tab tr.bi-aperta td { background: var(--paper-2); }
.bi-tab tr.bi-acc > td { background: var(--paper); padding: 0.75rem; border-left: 3px solid var(--magenta-deep); }
.bi-acc-box .bi-editor { margin: 0; }
.bi-sel { width: 2rem; text-align: center; }
.bi-sel input { width: 1.1rem; height: 1.1rem; cursor: pointer; }
.bi-freccia { width: 1.5rem; color: var(--ink-soft); text-align: center; }
.bi-gruppo td { font-weight: 800; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); background: var(--paper-2); }
.bi-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bi-selbar .bi-spazio { flex: 1; }
.bi-dett { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 1.5rem; }
@media (max-width: 900px) { .bi-dett { grid-template-columns: minmax(0, 1fr); } }
.bi-dett-info p { margin: 0 0 0.5rem; }
.bi-vivo { font-size: var(--t-sm, 0.9rem); }
.bi-check { display: flex; gap: 0.5rem; align-items: center; font-weight: 700; }
.bi-storico-mini { margin-top: 0.75rem; }
.bi-storico-mini summary { cursor: pointer; font-weight: 700; }
.bi-st-mod { margin: 0; padding-left: 1rem; }
.bi-storico td { vertical-align: top; font-size: var(--t-sm, 0.9rem); }

/* pulsante Dettagli: apre e chiude la riga a fisarmonica */
.bi-azione { width: 1%; white-space: nowrap; text-align: right; }
.bi-det { font: inherit; font-size: var(--t-xs); font-weight: 700; background: var(--white); border: 2px solid var(--ink-line); border-radius: 999px; padding: 0.25rem 0.7rem; cursor: pointer; white-space: nowrap; }
.bi-det:hover, .bi-det:focus-visible, tr.bi-aperta .bi-det { border-color: var(--magenta-deep); color: var(--magenta-deep); }
.bi-vivo { display: block; }
.bi-vivo strong { display: inline; }
.bi-pre { white-space: pre-line; font-size: var(--t-xs); }

/* 19/11/2026 finestra di modifica stand / catalogo componenti, foto stand nel dettaglio */
.bi-fin-ov { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,0.35); display: flex; align-items: flex-start; justify-content: center; padding: 3vh 12px; overflow-y: auto; }
.bi-fin { background: var(--white); border-radius: 16px; width: 100%; max-width: 640px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
.bi-fin-largo { max-width: 860px; }
.bi-fin-testa { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--ink-line); position: sticky; top: 0; background: var(--white); border-radius: 16px 16px 0 0; z-index: 1; }
.bi-fin-testa h2 { margin: 0; font-size: var(--t-m, 1.1rem); }
.bi-fin-x { border: 0; background: none; font-size: 1.2rem; cursor: pointer; padding: 0.2rem 0.5rem; }
.bi-fin-corpo { padding: 0.8rem 1rem 1rem; }
.bi-fin-corpo h3 { margin: 0.3rem 0; font-size: var(--t-s); }
.bi-fin-corpo input[type="search"] { width: 100%; }
.bi-cat-comp { max-height: 45vh; overflow-y: auto; border: 1px solid var(--ink-line); border-radius: 10px; padding: 0.4rem 0.6rem; margin-bottom: 0.6rem; }
.bi-cat-comp li { display: flex; align-items: center; gap: 0.4rem; }
.bi-cat-comp li span { flex: 1; }
.bi-gruppo-t { margin: 0.5rem 0 0.2rem; font-size: var(--t-s); }
body.bi-fin-aperta { overflow: hidden; }
.bi-stand-foto { display: block; margin: 0 0 0.6rem; }
.bi-stand-foto img { display: block; width: 100%; max-width: 420px; max-height: 300px; object-fit: contain; border-radius: 10px; background: var(--paper); }
/* 23/11/2026: soluzioni nascoste agli espositori (visibili solo all'Admin) */
.bi-listino tr.bi-nascosta > td:not(.bi-sel):not(.bi-azione) { opacity: .55; }
.bi-nasc { margin: 0 0 .6rem; }
