/* Fiche client Expédition (php/pm/PM_get_expedition.php) et fenêtre « Nouvelle expédition » (PM-add-expedition.php).
   S'appuie sur .ddd-achat (achat-modal.css) et .ddd-mix (mixage.css). */

.ddd-exp__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ddd-exp .ddd-achat__lines { border: 0; border-radius: 0; }
.ddd-exp .ddd-achat__lines .table-responsive { max-height: 65vh; }

/* Une facture = ligne d'en-tête, puis ses lots */
.ddd-exp__fact td { background: var(--a-accent-soft) !important; border-top: 2px solid var(--a-line); }
.ddd-exp__lot td { color: var(--a-text); }
.ddd-exp__lot.is-vendu td { color: var(--a-ko); }
.ddd-exp__vide { padding: 18px 14px !important; text-align: center; color: var(--a-muted); }

.ddd-exp__icon {
  border: 0; background: transparent; padding: 2px 4px; border-radius: 6px;
  color: var(--a-muted); line-height: 1;
}
.ddd-exp__icon:hover { background: #fff; color: var(--a-accent); }
.ddd-exp__icon.js-exp-supprimer:hover { color: var(--a-ko); }
.ddd-exp__icon:disabled { opacity: .4; }

.ddd-exp__badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  background: var(--a-card); color: var(--a-muted); border: 1px solid var(--a-line);
}
.ddd-exp__badge--vendu { background: #fee2e2; color: var(--a-ko); border-color: #fecaca; margin-left: 0; }

/* Fenêtre : totaux en tuiles, outils de la liste des lots */
.ddd-exp__tile-input {
  display: block; width: 100%; border: 0; padding: 0; background: transparent;
  font-size: 1.05rem; font-weight: 700; color: var(--a-accent);
  font-variant-numeric: tabular-nums;
}
.ddd-exp__outils { display: flex; align-items: center; gap: 8px; }
.ddd-exp__outils small { white-space: nowrap; }
#lot_table_content tr { cursor: pointer; }

@media (max-width: 991px) {
  .ddd-exp__outils { flex-wrap: wrap; }
}

/* Tableaux des fiches fournisseur (Achat, achat_fournisseur_lignes.php) et client (Vente, vente_client_lignes.php) :
   même présentation que la fiche Expédition */
.ddd-fiche-table .ddd-achat__lines-head { flex-wrap: wrap; gap: 8px; }
.ddd-fiche-table__legende { display: inline-flex; gap: 4px; }
.ddd-fiche-table__legende .ddd-exp__badge { margin-left: 0; }
.ddd-exp__badge--expedie { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.ddd-exp__badge--mixe { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.ddd-exp__lot.is-expedie td { color: #1d4ed8; }
.ddd-exp__lot.is-mixe td { color: #b45309; }
/* Fiches Achat / Vente / Expédition : la ligne de la facture (total) est sous ses lots → séparation sous le total */
.ddd-fiche-table .ddd-exp__fact td,
#tab-expedition .ddd-exp__fact td { border-top: 0; border-bottom: 2px solid var(--a-line); }
