/* Magasin et achats (GMO 2.35.0, lot 5) : feuille des écrans magasin/stock.js (État du stock), magasin/rapprochement.js
   (Stock Reconciliation), magasin/reappro.js (Réapprovisionnement), magasin/reactifs.js (Reagents and Cyanide Register),
   magasin/demandes.js (Demandes de la Maintenance), du panneau panneaux/cycle_achat.js (Cycle de vie) et des ajouts du
   Stores Overview (tdb_magasin.js) ; chargée par index.html ; préfixe mag-. Jetons de thème seulement (aucune couleur écrite
   en dur), aucun style en ligne dans les écrans (CSP). Un état ou un niveau porte toujours son texte à côté de sa couleur.
   La page ne défile pas : le corps de l'écran défile seul. */

.mag-ecran { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--e2); padding: var(--e2); }
.mag-ecran [hidden] { display: none !important; }
.mag-barre { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); }
.mag-titre { display: inline-flex; align-items: center; gap: var(--e2); }
.mag-titre h2 { margin: 0; font-size: var(--fs-l); }
.mag-champ { display: inline-flex; align-items: center; gap: var(--e2); }
.mag-champ .champ { width: 170px; }
.mag-pousse { flex: 1; }
.mag-m:empty { display: none; }
.mag-corps { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--e2); scrollbar-width: thin; }
.mag-corps:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mag-section { flex: none; }
.mag-tete { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2); padding: var(--e2) var(--e3); }
.mag-tete h3 { margin: 0; font-size: var(--fs-m); }
.mag-defile { max-height: 50vh; overflow: auto; padding: 0 var(--e3) var(--e2); scrollbar-width: thin; }
.mag-table { width: 100%; }
.mag-table th[scope="row"] { font-weight: 500; text-align: left; }
.mag-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mag-table tr.mag-negatif th, .mag-table tr.mag-negatif td { background: var(--bad-bg); }
.mag-table tr.mag-sous-seuil th, .mag-table tr.mag-sous-seuil td { background: var(--warn-bg); }
.mag-props { padding: 0 var(--e3) var(--e2); }
.mag-sous { margin: var(--e2) 0 var(--e1); font-size: var(--fs-s); text-transform: uppercase; color: var(--ink-2); }
.mag-liste { margin: 0; padding-left: var(--e3); font-size: var(--fs-s); }
.mag-cycle { margin: 0; padding-left: var(--e3); font-size: var(--fs-s); }
.mag-actions { display: flex; flex-wrap: wrap; gap: var(--e2); margin-top: var(--e2); }
.mag-detail { padding: 0 var(--e3) var(--e2); }
.mag-dest { display: inline-block; margin-right: var(--e2); white-space: nowrap; }

/* États et étiquettes (To investigate, Explained, NOT SET, Negative, Below, Cyanide ; état d'une demande ou d'une commande). */
.mag-v { display: inline-block; padding: 0 var(--e2); border: 1px solid var(--line-fort); border-radius: var(--r2); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
.mag-v-ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.mag-v-warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.mag-v-bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.mag-v-ns { color: var(--ink-2); border-style: dashed; }

@media print {
  .mag-barre .btn, .mag-champ, .mag-actions { display: none !important; }
  .mag-corps, .mag-defile { overflow: visible; max-height: none; }
}
