/* Giacenze: da quando è ferma la classificazione degli articoli */
.mag-tot-quando {
  margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
}

/* Giacenze e Riassortimento: il codice apre la scheda dell'articolo */
.mag-cod {
  background: none; border: none; padding: 0; font-family: inherit;
  font-size: inherit; font-weight: 800; color: #111827; cursor: pointer;
  text-decoration: underline; text-decoration-color: #d1d5db; text-underline-offset: 3px;
}
.mag-cod:hover { color: #1d4ed8; text-decoration-color: #1d4ed8; }

/* Utenti: lo stato del collegamento col proprio account di accesso */
.ut-segnale {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .3px; cursor: help; white-space: nowrap;
}

/* =====================================================================
   BOOSTER — l'ordine dei picchi (Natale)
   Sta in un foglio suo: la sezione è grossa e tutta nuova.
   ===================================================================== */
.bst-barra {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px 0; font-size: 12.5px; color: var(--text-muted);
}
.bst-neg {
  padding: 3px 9px; border-radius: 8px; background: #111827; color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
}
.bst-file { font-weight: 800; color: #111827; }
.bst-quando { font-weight: 600; }
.bst-attesa { font-weight: 700; color: #1e40af; }
.bst-errore { font-weight: 700; color: #dc2626; }
.bst-tot-barra { font-size: 13px; color: #374151; }
.bst-tot-barra strong { color: #111827; }

/* ── ELENCO DELLE PROPOSTE ─────────────────────────────────────────── */
.bst-elenco-testa {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 16px 20px 0;
}
.bst-elenco-tit { font-size: 16px; font-weight: 800; color: #111827; }
.bst-elenco-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.bst-elenco {
  margin: 14px 20px 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 13px; overflow: hidden;
}
/* le colonne dell'elenco: stesse misure per testata e righe */
.bst-prop-testa, .bst-prop {
  display: grid; grid-template-columns: minmax(180px, 1fr) 130px 84px 78px 108px 150px 108px;
  align-items: center;
}
.bst-prop-testa {
  background: var(--primary); color: #fff;
  font-size: 9.5px; font-weight: 800; letter-spacing: .4px;
}
.bst-prop-testa > div { padding: 9px 10px; }
.bst-prop-testa > div:first-child { padding-left: 16px; }
.bst-prop { border-bottom: 1px solid #f3f4f6; }
.bst-prop:last-child { border-bottom: none; }
.bst-prop:hover { background: #f9fafb; }
.bst-prop > div { padding: 11px 10px; min-width: 0; }
.bst-prop-nome { padding-left: 16px !important; }
.bst-prop-nome .bst-apri { font-size: 14px; }
.bst-prop-file {
  font-size: 11.5px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bst-prop-quando { font-size: 12px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.bst-prop-n   { text-align: right; font-size: 13px; font-weight: 700; color: #374151; }
.bst-prop-val { text-align: right; font-size: 15px; font-weight: 800; color: #111827; white-space: nowrap; }
.bst-prop-testa .bst-prop-n, .bst-prop-testa .bst-prop-val { font-size: 9.5px; color: #fff; font-weight: 800; }
.bst-nastro.piccolo { height: 8px; }
.bst-prop-nota { font-size: 10px; font-weight: 700; color: #9ca3af; margin-top: 4px; }
.bst-prop-azioni { text-align: right; white-space: nowrap; padding-right: 14px !important; }
.bst-menu-btn {
  background: none; border: none; font-family: inherit; font-size: 16px; line-height: 1;
  color: #9ca3af; cursor: pointer; padding: 4px 2px; margin-left: 2px;
}
.bst-menu-btn:hover { color: #111827; }
/* il menu della riga vive sul body, così non viene tagliato dal riquadro */
.bst-menu {
  position: fixed; z-index: 2000; min-width: 150px;
  background: var(--card); border: 1px solid var(--border); border-radius: 11px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 5px; display: flex; flex-direction: column;
}
.bst-menu button {
  background: none; border: none; text-align: left; padding: 8px 11px; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 700; color: #111827; cursor: pointer;
}
.bst-menu button:hover { background: var(--bg); }
.bst-nota-elenco { margin: 12px 20px 22px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.bst-indietro {
  background: none; border: 1.5px solid var(--border); border-radius: 9px;
  padding: 5px 11px; font-family: inherit; font-size: 12px; font-weight: 800;
  color: #111827; cursor: pointer;
}
.bst-indietro:hover { background: var(--bg); }

.bst-vuoto {
  margin: 20px; padding: 26px 24px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  font-size: 13.5px; color: var(--text-muted); line-height: 1.6; max-width: 720px;
}
.bst-vuoto-tit { font-size: 15px; font-weight: 800; color: #111827; margin-bottom: 8px; }
.bst-vuoto p { margin: 0 0 10px; }
.bst-vuoto .btn { margin-top: 6px; }

/* in attesa della cassa: nessuna riga a trattini, solo l'avviso */
.bst-caricamento {
  display: flex; align-items: center; gap: 14px;
  margin: 16px 20px; padding: 20px 22px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; max-width: 560px;
}
.bst-caricamento-tit { font-size: 14px; font-weight: 800; color: #111827; }
.bst-caricamento-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.bst-rotella {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 3px solid #e5e7eb; border-top-color: #111827;
  animation: bst-gira .8s linear infinite;
}
@keyframes bst-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bst-rotella { animation-duration: 2.4s; } }

.bst-et { font-size: 10px; font-weight: 800; letter-spacing: .5px; color: var(--text-muted); }

/* come si divide l'ordine fra le classi di vendita */
.bst-classi {
  margin: 14px 20px 0; padding: 13px 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: 13px;
}
.bst-classi-testa { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.bst-classi-pz  { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.bst-classi-val { font-size: 16px; font-weight: 800; color: #111827; }
.bst-nastro { display: flex; height: 15px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--bg); }
.bst-fetta { display: block; height: 100%; }
.bst-legenda { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.bst-leg {
  display: flex; align-items: center; gap: 7px; padding: 5px 9px;
  background: none; border: 1.5px solid transparent; border-radius: 9px;
  font-family: inherit; cursor: pointer;
}
.bst-leg:hover { background: var(--bg); }
.bst-leg.attiva { border-color: #111827; background: var(--bg); }
.bst-leg-punto { width: 10px; height: 10px; border-radius: 3px; }
.bst-leg-nome { font-size: 12px; font-weight: 800; color: #111827; }
.bst-leg-num { font-size: 12px; font-weight: 700; color: var(--text-muted); }

.bst-strumenti {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 20px 0;
}
.bst-sep { width: 1px; height: 24px; background: var(--border); }
.bst-rosso { color: #b91c1c; }
.bst-campo { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #374151; }
.bst-campo select, .bst-campo input {
  height: 34px; border: 1.5px solid var(--border); border-radius: 9px;
  padding: 0 9px; font-family: inherit; font-size: 12.5px; color: var(--text); outline: none;
}
.bst-campo input { width: 190px; }
.bst-conta { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* la tabella dell'ordine */
.bst-tabella {
  margin: 14px 20px 22px; background: var(--card);
  border: 1px solid var(--border); border-radius: 13px; overflow: auto;
}
/* Colonne di larghezza stabile, come nelle Giacenze: senza, una descrizione
   lunga allarga la tabella e manda la pagina a scorrere di lato. */
.bst-tabella table {
  width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed;
  /* sotto questa misura la descrizione sparirebbe schiacciata: meglio far
     scorrere il riquadro, che su schermo da negozio non serve mai */
  min-width: 920px;
}
.bst-tabella th {
  text-align: left; padding: 9px 14px; white-space: nowrap;
  font-size: 10px; font-weight: 800; letter-spacing: .4px; color: #fff;
  position: sticky; top: 0; background: var(--primary); z-index: 1;
}
.bst-tabella td { padding: 7px 14px; border-bottom: 1px solid #f3f4f6; }
.bst-tabella tbody tr:hover { background: #f9fafb; }
.bst-tabella tr.bst-ignoto { background: #fff7ed; }
.bst-tabella th.bst-n, .bst-tabella td.bst-n,
.bst-tabella th.bst-val, .bst-tabella td.bst-val { text-align: right; white-space: nowrap; }
.bst-tabella th.bst-qta, .bst-tabella td.bst-qta,
.bst-tabella th.bst-classe, .bst-tabella td.bst-classe { text-align: center; }
/* il colore va sulle celle, non sulle intestazioni: quelle restano bianche
   sulla barra scura */
.bst-tabella th.bst-n { width: 68px; }
.bst-tabella td.bst-n { font-weight: 700; color: #374151; }
.bst-tabella td.bst-dic { font-weight: 800; color: #b45309; }
.bst-tabella th.bst-val { width: 96px; }
.bst-tabella td.bst-val { font-size: 14px; font-weight: 800; color: #111827; }
/* la descrizione prende lo spazio che resta, su una riga sola: le righe
   restano tutte della stessa altezza e l'elenco si scorre a colpo d'occhio
   (per esteso sta nella scheda dell'articolo) */
.bst-tabella td.bst-desc {
  font-size: 12.5px; color: #374151;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* la descrizione è l'unica colonna elastica: le altre hanno misura propria */
/* foto, codice: misura propria; la descrizione è l'unica elastica */
.bst-tabella th.bst-foto, .bst-tabella td.bst-foto { width: 52px; padding-right: 0; }
.bst-tabella .mag-foto { width: 38px; height: 38px; border-radius: 6px; }
.bst-tabella th:nth-child(2) { width: 118px; }
.bst-tabella th:nth-child(3) { width: auto; }
/* la colonnina per togliere la riga */
.bst-tabella th.bst-tog, .bst-tabella td.bst-tog { width: 40px; text-align: center; padding-left: 0; padding-right: 8px; }
.bst-togli {
  width: 26px; height: 26px; border-radius: 7px; border: none; background: none;
  font-family: inherit; font-size: 17px; line-height: 1; color: #9ca3af; cursor: pointer;
}
.bst-togli:hover { background: #fef2f2; color: #b91c1c; }
.bst-sch-azioni { display: flex; flex-direction: column; gap: 6px; flex: none; }
/* avviso sui dati di vendita che non arrivano fino a dicembre */
.bst-avviso {
  margin: 12px 20px 0; padding: 12px 15px; border-radius: 12px;
  background: #fef3c7; border: 1.5px solid #fcd34d;
  font-size: 12.5px; color: #92400e; line-height: 1.55;
}
.bst-avviso.bst-grave { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.bst-tabella th.bst-classe { width: 72px; }
.bst-tabella th.bst-qta { width: 88px; }
.bst-apri {
  background: none; border: none; padding: 0; font-family: inherit;
  font-size: 12.5px; font-weight: 800; color: #111827; cursor: pointer;
  text-decoration: underline; text-decoration-color: #d1d5db; text-underline-offset: 3px;
}
.bst-apri:hover { color: #1d4ed8; text-decoration-color: #1d4ed8; }
.bst-nd { font-size: 10.5px; font-weight: 800; color: #b45309; }
.bst-tabella .bst-qta input {
  width: 64px; height: 32px; box-sizing: border-box; text-align: center;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 800; color: #111827; outline: none;
}
.bst-tabella .bst-qta input:focus { border-color: #111827; }
.bst-tabella tfoot td {
  background: var(--bg); border-bottom: none; position: sticky; bottom: 0;
  font-size: 11px; font-weight: 800; letter-spacing: .4px; color: #374151;
}
.bst-tabella tfoot .bst-qta, .bst-tabella tfoot .bst-val { font-size: 15px; color: #111827; }

/* finestra: scelta delle colonne del file */
.bst-modale { display: flex; flex-direction: column; max-height: 92vh; }
.bst-mod-testa {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.bst-mod-testa > div:first-child { flex-grow: 1; min-width: 0; }
.bst-mod-tit { font-size: 15px; font-weight: 800; color: #111827; }
.bst-mod-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.bst-mod-corpo { padding: 16px 18px; overflow: auto; }
.bst-mod-piede {
  display: flex; justify-content: flex-end; gap: 9px;
  padding: 13px 18px; border-top: 1px solid var(--border); background: var(--bg);
}
.bst-mappa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.bst-mappa-campo { display: block; }
.bst-mappa-campo select {
  width: 100%; box-sizing: border-box; height: 40px; margin-top: 5px;
  border: 1.5px solid var(--border); border-radius: 10px; padding: 0 10px;
  font-family: inherit; font-size: 13px; font-weight: 800; color: #111827; background: #fff;
}
.bst-ante { border: 1px solid var(--border); border-radius: 11px; overflow: auto; max-height: 230px; }
.bst-ante table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bst-ante th {
  text-align: left; padding: 7px 10px; background: var(--bg); white-space: nowrap;
  font-size: 10px; font-weight: 800; letter-spacing: .3px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.bst-ante th.scelta { background: #dbeafe; color: #1e40af; }
.bst-ante td { padding: 7px 10px; border-bottom: 1px solid #f3f4f6; color: #374151; white-space: nowrap; }
.bst-ante td.scelta { background: #eff6ff; font-weight: 800; color: #111827; }
.bst-ante-n { color: #9ca3af; font-weight: 700; }
.bst-esito {
  margin-top: 13px; padding: 11px 14px; border-radius: 11px;
  background: #eff6ff; border: 1.5px solid #bfdbfe;
  font-size: 12.5px; color: #1e40af; line-height: 1.55;
}
.bst-esito.attenzione { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

/* finestra: la scheda dell'articolo */
.bst-scheda { padding: 18px 20px 20px; overflow: auto; max-height: 92vh; }
.bst-sch-testa { display: flex; align-items: flex-start; gap: 14px; }
.bst-sch-testa > div:nth-child(2) { flex-grow: 1; min-width: 0; }
.bst-sch-foto { flex: none; }
.bst-sch-foto .mag-foto { width: 76px; height: 76px; }
.bst-sch-cod { font-size: 19px; font-weight: 800; color: #111827; }
.bst-sch-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.bst-sch-tag { display: flex; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.bst-tag {
  padding: 3px 9px; border-radius: 7px; background: var(--bg);
  font-size: 10.5px; font-weight: 800; color: #374151;
}
.bst-sch-qta { text-align: right; flex: none; }
.bst-sch-qta input {
  width: 104px; height: 44px; box-sizing: border-box; margin-top: 4px;
  border: 2px solid #111827; border-radius: 10px; text-align: center;
  font-family: inherit; font-size: 22px; font-weight: 800; color: #111827; outline: none;
}
.bst-sch-val { font-size: 12px; font-weight: 800; color: #111827; margin-top: 5px; }
.bst-sch-numeri {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-top: 16px;
}
.bst-sch-num { border: 1px solid var(--border); border-radius: 11px; padding: 11px 12px; }
.bst-sch-num-v { font-size: 19px; font-weight: 800; color: #111827; margin-top: 3px; }

/* il venduto mese per mese: dicembre in evidenza, è il mese che si rifà */
.bst-grafico { margin-top: 18px; }
.bst-barre {
  display: flex; align-items: flex-end; gap: 7px; height: 170px;
  margin-top: 8px; border-bottom: 1.5px solid var(--border);
}
.bst-barra-mese { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bst-barra-n { font-size: 10.5px; font-weight: 800; color: #374151; text-align: center; height: 15px; }
.bst-barra-col { width: 100%; border-radius: 5px 5px 0 0; background: #93c5fd; min-height: 2px; }
.bst-barra-col.dic { background: #b45309; }
.bst-barra-l { font-size: 10px; font-weight: 700; color: #9ca3af; text-align: center; padding-top: 4px; }
.bst-barra-l.dic { color: #b45309; font-weight: 800; }
.bst-sch-nota {
  margin-top: 14px; padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 11px;
  font-size: 12.5px; color: #374151; line-height: 1.6;
}

@media (max-width: 900px) {
  .bst-barra { margin: 0 12px; padding-left: 0; padding-right: 0; }
  /* l'elenco diventa una scheda per proposta */
  .bst-elenco-testa, .bst-nota-elenco { margin-left: 12px; margin-right: 12px; }
  .bst-elenco { margin: 12px; }
  .bst-prop-testa { display: none; }
  .bst-prop { display: block; padding: 12px 14px; }
  .bst-prop > div { padding: 0; }
  .bst-prop-nome { padding-left: 0 !important; }
  .bst-prop-quando { display: inline-block; margin-top: 6px; }
  /* senza intestazioni i numeri da soli non direbbero niente */
  .bst-prop-n { display: inline-block; text-align: left; margin: 6px 12px 0 0; }
  .bst-prop-art::after { content: " articoli"; font-size: 11px; font-weight: 700; color: var(--text-muted); }
  .bst-prop-pz::after  { content: " pezzi";   font-size: 11px; font-weight: 700; color: var(--text-muted); }
  .bst-prop-val { text-align: left; margin-top: 4px; font-size: 17px; }
  .bst-prop-comp { margin-top: 8px; }
  .bst-prop-azioni { text-align: left; margin-top: 10px; padding-right: 0 !important; }
  .bst-strumenti, .bst-classi, .bst-avviso { margin-left: 12px; margin-right: 12px; }
  .bst-tabella { margin: 12px; }
  .bst-campo input { width: 130px; }
  .bst-mappa { grid-template-columns: 1fr; }
  .bst-sch-numeri { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bst-sch-testa { flex-wrap: wrap; }
  .bst-barre { height: 130px; gap: 4px; }
}
