/* Gemeinsame Design-Tokens für Board, Aufgaben- und Lager-Seite. Alle drei
   Seiten binden dieses Stylesheet ein, damit Farben, Knöpfe, Fenster
   (Modals) und Fehlermeldungen überall gleich aussehen. Aufgaben/Lager
   hatten früher eigene, leicht abweichende Variablennamen (--muted,
   --accent-hover) – die Aliase unten sorgen dafür, dass deren
   Seiten-spezifisches CSS unverändert weiterfunktioniert. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --border: #dfe2e8;
  --text: #1f2430;
  --text-muted: #6b7280;
  --accent: #f5a623;
  --accent-dark: #d98c0e;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --purple: #7c3aed;
  --radius: 10px;
  font-size: 15px;

  /* Aliase für die alten Variablennamen von Aufgaben-/Lager-Seite */
  --muted: var(--text-muted);
  --accent-hover: var(--accent-dark);
  --accent-text: #1c2333;
  --card-bg: var(--panel);
  --card-border: var(--border);
  --card-input-bg: #f7f8fa;
  --card-text: var(--text);
  --card-muted: var(--text-muted);
  --card-faint: #9aa3b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hidden { display: none !important; }

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #1c2333;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-logo-chip { background: #ffffff; border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-title { font-size: 19px; font-weight: 600; color: #ffffff; white-space: nowrap; }

/* Gemeinsamer Seiten-Container für Aufgaben-/Lager-Seite (schmalere Ansicht
   als das volle Board) */
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* Lade-Zustand – identisch auf allen drei Seiten */
.loading-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 40vh; color: var(--text-muted); font-size: 0.875rem;
}

/* Sekundärer Kopfzeilen-Knopf auf Aufgaben-/Lager-Seite – optisch identisch
   zu .btn.btn-secondary auf dem Board */
.db-btn {
  font-size: 14px; font-weight: 600;
  background: #333c52; border: none; color: white;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.db-btn:hover { background: #414c68; }

/* Hinweis-/Fehler-Banner (z. B. Nachbestellhinweis im Lager) – gleiche
   Formsprache wie die Konflikt-Hinweise oben im Board */
.banner {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.875rem;
}
.banner-warn { background: #fff3cd; border: 1px solid #f0d98a; color: #7a5a00; }
.banner-error { background: #fdecec; border: 1px solid #f3b8b3; color: #a3271e; }
.banner svg { flex-shrink: 0; }
.topbar h1 { font-size: 19px; margin: 0; font-weight: 600; }
.topbar-row input[type="text"] {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #333c52;
  background: #2a3247;
  color: white;
  min-width: 180px;
}
.topbar-row input::placeholder { color: #9aa3b8; }

.icon-btn-gear {
  background: #2a3247;
  border: 1px solid #333c52;
  color: white;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn-gear:hover { background: #414c68; }

.neu-btn { flex-shrink: 0; white-space: nowrap; }

.whoami-select {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #333c52;
  background: #2a3247;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  height: 36px;
}

/* Neutraler Hinweis-Ton statt Gefahren-Rot: "Lager – Nachbestellen" ist eine
   Erinnerung, kein Fehler/keine Löschwarnung – gleiche Amber-Farbwelt wie
   die Konflikt-/Nachbestell-Banner im Rest der App. */
.btn-alert { background: #fdf1de; color: #7a5a00; border: 1px solid #f0d5a0; }
.btn-alert:hover { background: #f8e6c4; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #1c2333; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #333c52; color: white; }
.btn-secondary:hover { background: #414c68; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: #fdecec; }

.conflict-banner {
  background: #fff3cd;
  color: #7a5a00;
  padding: 10px 20px;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid #f0d98a;
}

.konflikt-dateien-banner {
  background: #fff3cd;
  color: #7a5a00;
  padding: 10px 20px;
  font-size: 13px;
  border-bottom: 1px solid #f0d98a;
}
.konflikt-dateien-liste {
  margin: 6px 0 0;
  padding-left: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.board-controls {
  padding: 10px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.board-tabs { display: flex; gap: 6px; }
.board-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
}
.board-tab:hover { color: var(--text); }
.board-tab.active { background: #333c52; color: white; border-color: #333c52; }
.board-tab.active[data-view="service"] { background: var(--purple); border-color: var(--purple); }
/* Zahl der offenen (nicht erledigten) Aufträge je Tab – dezente Pille, die
   sich per rgba() automatisch an die Textfarbe (aktiv/inaktiv) anpasst. */
.board-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(51, 60, 82, 0.12);
  color: inherit;
  vertical-align: middle;
}
.board-tab.active .board-tab-count { background: rgba(255, 255, 255, 0.28); }
.toggle-erledigt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.toggle-erledigt input { width: 15px; height: 15px; cursor: pointer; }

/* Board */
.board {
  display: flex;
  gap: 14px;
  padding: 18px;
  overflow-x: auto;
  align-items: flex-start;
  min-height: calc(100vh - 60px);
}

.column {
  background: #eceef2;
  border-radius: var(--radius);
  min-width: 250px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 96px);
}

.column-header {
  padding: 12px 14px 8px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333c52;
}
.column-count {
  background: #d7dbe3;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5268;
}

.column-cards {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}
.column-cards.drag-over { background: #dde6ff; border-radius: 8px; }

.card {
  background: var(--panel);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  cursor: grab;
  border: 1px solid var(--border);
  border-left: 5px solid var(--border);
}
.card:active { cursor: grabbing; }
.card.loc-ailertchen { border-left-color: #2563eb; background: #f3f7ff; }
.card.loc-rheinberg { border-left-color: #16a34a; background: #f2fbf4; }
/* Service-Aufträge sollen sich deutlich von den übrigen abheben – überschreibt
   bewusst die Standort-Farbe (Reihenfolge im Stylesheet nach den loc-Regeln). */
.card.card-service {
  border-left-color: var(--purple);
  border-left-width: 7px;
  background: #f6f1ff;
  border-color: #ddd0fa;
}
.card-service-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 2px 9px;
  border-radius: 10px;
  margin-bottom: 6px;
}
.card-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; line-height: 1.3; }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.card-progress { font-variant-numeric: tabular-nums; }
.card-progress.complete { color: var(--green); font-weight: 700; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 34, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--panel);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 22px 22px;
}
.modal-small { max-width: 420px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.m-title-input {
  font-size: 18px;
  font-weight: 700;
  border: none;
  outline: none;
  flex: 1;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.m-title-input:focus { border-bottom: 2px solid var(--accent); }

.icon-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
}
.icon-btn:hover { color: var(--text); }

.modal-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.modal-meta label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.meta-dates { margin-left: auto; align-self: center; font-size: 12px; }

.type-row { align-items: center; margin-top: -6px; }
.type-row-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.type-checks { display: flex; gap: 12px; flex-wrap: wrap; }
.type-checks label {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  font-weight: 500; font-size: 14px; color: var(--text); cursor: pointer;
}
.type-checks input[type="checkbox"] { width: 16px; height: 16px; }
/* "Service" steht mit Abstand rechts von den übrigen Optionen und ist nur
   an der leicht rot eingefärbten Schrift erkennbar – bewusst zurückhaltend,
   kein Rahmen/Hintergrund. */
.type-checks label.type-check-service {
  margin-left: 16px;
  color: rgba(220, 38, 38, 0.75);
}

.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.type-badge {
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px;
  background: #eef1f7; color: #333c52;
}
.location-badge {
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px;
  background: #fdf1de; color: #92600c;
}
.location-badge.loc-ailertchen { background: #dbe8ff; color: #1d4ed8; }
.location-badge.loc-rheinberg { background: #d9f5e1; color: #15803d; }
.type-badge[data-type="service"] { background: var(--purple); color: #fff; font-weight: 700; }

.checklist-add { flex-direction: row; margin-top: 8px; }
.checklist-add input { flex: 1; }
.checklist-remove {
  background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 15px; padding: 0 2px;
  margin-top: 2px; flex-shrink: 0;
}
.checklist-remove:hover { color: var(--red); }

.zust-intro { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }
.zust-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.zust-table th, .zust-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.zust-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; }
.zust-table select { width: 100%; }

select, input[type="text"], textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

.modal-section {
  margin-bottom: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
/* Direkt unterm Modal-Header keine zusätzliche Trennlinie -- da gibt es noch
   nichts, wovon man den Abschnitt abgrenzen müsste. */
.modal-header + .modal-section { border-top: none; padding-top: 0; }
.modal-section h3 { font-size: 14px; margin: 0 0 8px; color: #333c52; }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 10px 12px;
}
.checklist li.done { background: #eafaf0; }
.checklist input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.checklist-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.checklist-label { font-size: 14px; font-weight: 600; color: var(--text); }
.checklist-sub { font-size: 11px; color: var(--text-muted); }
.checklist-thumb {
  width: 40px; height: 40px; object-fit: cover; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border);
}
.checklist-file-link {
  font-size: 12px; font-weight: 600; color: var(--blue); text-decoration: none;
  background: #eef1f7; border-radius: 6px; padding: 4px 8px; white-space: nowrap;
}
.checklist-file-link:hover { text-decoration: underline; }
.checklist-attach {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  width: 30px; height: 30px; font-size: 14px; cursor: pointer; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.checklist-attach:hover { color: var(--text); border-color: var(--text-muted); }

.notes-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.notes-list li { background: #f7f8fa; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.note-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.note-text { white-space: pre-wrap; }

.note-add { display: flex; flex-direction: column; gap: 6px; }
.note-add select { align-self: flex-start; }
.note-add textarea { resize: vertical; }
.note-author-fixed { font-size: 13px; color: var(--text); font-weight: 600; align-self: flex-start; }

/* Höhere Spezifität als ".modal-section label" nötig, sonst gewinnt dessen
   "display:flex; flex-direction:column" und reißt Beschriftung + Auswahl
   auseinander statt sie nebeneinander in einer Zeile zu zeigen. */
.checklist-top .checklist-assign {
  display: inline-flex; flex-direction: row; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 500; margin-bottom: 0; color: var(--text-muted); white-space: nowrap;
}
.checklist-assignee-select { font-size: 12px; padding: 3px 6px; border-radius: 6px; max-width: 190px; }

.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--border); }

.team-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.team-list li { display: flex; justify-content: space-between; align-items: center; background: #f7f8fa; padding: 6px 10px; border-radius: 6px; }
.team-list button { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13px; }
.team-list-row { gap: 10px; }
.team-list-row > span { flex-shrink: 0; min-width: 90px; font-weight: 600; }
.team-email-input { flex: 1; min-width: 0; font-size: 13px; padding: 5px 8px; }
.team-remove-btn { flex-shrink: 0; }

.modal-section label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; margin-bottom: 10px; color: #333c52; }
.modal-section input[type="text"] { width: 100%; }

/* ---------- Automatisierungen (Einstellungen-Modal) ---------- */
.automation-group { margin-bottom: 16px; }
.automation-group:last-child { margin-bottom: 0; }
.automation-group-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin: 0 0 6px; }
.automation-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.automation-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #f7f8fa; padding: 8px 10px; border-radius: 6px;
}
.automation-row-label { font-size: 13px; font-weight: 600; color: #333c52; }
.automation-row-hint { font-size: 11.5px; font-weight: 400; color: var(--text-muted); margin-top: 1px; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; background: #c7cbd4; border-radius: 999px; transition: background .15s;
}
.switch-track::before {
  content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px;
  background: white; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::before { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.required-mark { color: var(--red); font-weight: 700; }
.form-error {
  background: #fdecec;
  color: var(--red);
  border: 1px solid #f5b8b8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
}

@media (max-width: 700px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .topbar-row { flex-wrap: wrap; }
  .topbar-left, .topbar-right { flex-wrap: wrap; }
}

/* ---------- Beleg-Upload (public/belege/belege.js) ----------
   Gemeinsam von der Auftrags-Seite (Warenausgang "beim Auftrag") und der
   Lager-Seite (Warenausgang + Wareneingang) genutzt. */
.auftragsdokument-status { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.auftragsdokument-status.ok { color: var(--green); font-weight: 600; }
.auftragsdokument-status a { color: var(--blue); text-decoration: none; }
.auftragsdokument-status a:hover { text-decoration: underline; }

.beleg-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.beleg-card { background: #f7f8fa; border-radius: 8px; padding: 10px 12px; border: 1px solid var(--border); }
.beleg-card-unbekannt { border-color: var(--accent); background: #fffaf0; }
.beleg-card-ignoriert { opacity: 0.6; }
.beleg-zeile-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.beleg-zeile-ok, .beleg-zeile-warn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.beleg-check { display: flex; }
.beleg-menge { color: var(--text-muted); min-width: 40px; }
.beleg-name { font-weight: 600; flex: 1; min-width: 120px; }
.beleg-loc-badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: #dbe8ff; color: #1d4ed8; }
.beleg-loc-select { font-size: 12px; padding: 3px 6px; }
.beleg-badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: #eef1f7; color: #333c52; }
.beleg-badge-info { background: #fdf1de; color: #92600c; }
.beleg-badge-warn { background: #f4dfdc; color: #8e2e28; }
.beleg-badge-ok { background: #d9f5e1; color: #15803d; }
.beleg-bestandteile { display: flex; flex-direction: column; gap: 6px; padding-left: 8px; border-left: 2px solid var(--border); }
.beleg-muted { color: var(--text-muted); font-size: 13px; }
.beleg-footer { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

.beleg-resolver { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.beleg-hint { font-size: 12px; color: var(--text-muted); background: #fdf1de; border-radius: 6px; padding: 6px 8px; }
.beleg-resolver-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.beleg-tab-btn { font-size: 12px; padding: 5px 10px; }
.beleg-resolver-body { display: flex; flex-direction: column; gap: 8px; }
.beleg-resolver-body label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #333c52; }
.beleg-input { font-family: inherit; font-size: 13px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: white; color: var(--text); }
.beleg-link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }
.beleg-artikel-suche { display: flex; flex-direction: column; gap: 4px; }
.beleg-artikel-ergebnisse { display: flex; flex-direction: column; gap: 2px; max-height: 160px; overflow-y: auto; }
.beleg-artikel-treffer { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 5px 7px; border-radius: 6px; cursor: pointer; background: #fff; border: 1px solid var(--border); }
.beleg-artikel-treffer:hover { background: #eef1f7; }
.beleg-artikel-meta { color: var(--text-muted); white-space: nowrap; }
.beleg-artikel-leer { font-size: 12px; color: var(--text-muted); padding: 4px; }
.beleg-code-kandidaten { font-size: 12px; }
.beleg-baugruppe-form, .beleg-new-artikel-form { display: flex; flex-direction: column; gap: 8px; }
.beleg-baugruppe-rows { display: flex; flex-direction: column; gap: 8px; }
.beleg-bg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
.beleg-bg-row .beleg-artikel-suche { flex: 1; min-width: 180px; }
.beleg-bg-row .beleg-bg-search, .beleg-bg-row .beleg-bg-picked { flex: 1; min-width: 180px; }
.beleg-bg-picked-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.beleg-bg-picked-check { color: var(--green); font-weight: 700; font-size: 16px; }
.beleg-bg-picked-info { display: flex; flex-direction: column; gap: 2px; }
.beleg-bg-picked-name { font-weight: 600; }
.beleg-bg-picked-menge { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.beleg-bg-menge { width: 80px; }
.auto-abbuchen-label { flex-direction: row !important; align-items: center; gap: 6px !important; }
.auto-abbuchen-label input[type="checkbox"] { width: 16px; height: 16px; }

/* ---------- Bestellungen (Wareneingang-Belege sind erst eine Bestellung,
   kein fertiger Wareneingang - siehe Nachtrag 7.11.2026) ---------- */
.beleg-bezeichnung-feld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #333c52; margin-bottom: 4px; }
.beleg-liefer-menge { width: 70px; }

/* ---------- "Neuen Artikel anlegen" im Warenausgang-Resolver - freie
   Artikelnummer automatisch vorschlagen (siehe Nachtrag 7.11.2026) ---------- */
.beleg-artnr-row { display: flex; align-items: center; gap: 10px; }
.beleg-artnr-row .beleg-input { flex: 1; }
.beleg-artnr-row .beleg-link-btn { white-space: nowrap; }
