/* ==========================================================================
   Stammdaten – Fanclub Trinkpause
   Baut auf css/style.css, admin/admin.css, kasse/kasse.css, tickets/tickets.css auf.
   ========================================================================== */

#stammdatenSectionsContainer {
  display: flex;
  /* Die einzelnen Bereiche (Shop & Kasse, Tickets, Veranstaltungen, …)
     sollen IMMER strikt untereinander stehen - vorher ergab sich das
     nur zufällig daraus, dass jeder Bereich mindestens 700px breit war
     und zwei davon nebeneinander nicht mehr in die Seite passten.
     "flex-direction: column" macht das jetzt unabhängig von der Breite
     der einzelnen Bereiche explizit. */
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}
.stammdaten-nav-grid-wrap {
  display: inline-flex;
  align-items: stretch;
}
.stammdaten-nav-grid {
  /* War vorher "display:grid" mit "grid-template-columns:
     repeat(auto-fill, 220px)" und "width: fit-content" - diese
     Kombination ist eine bekannte CSS-Falle: "auto-fill" muss die
     verfügbare Breite kennen, um die Spaltenzahl zu berechnen, aber
     "fit-content" berechnet die Breite wiederum aus dem Inhalt -
     ein Zirkelbezug, den Browser uneinheitlich auflösen (meist mit
     nur einer Spalte, wenn das Ganze noch zusätzlich in einem
     flex-Container mit mehreren Geschwister-Elementen steckt, wie hier
     bei den einzelnen Stammdaten-Bereichen). Ergebnis: Kacheln
     standen senkrecht untereinander statt waagrecht nebeneinander,
     und die Bereiche selbst rückten nebeneinander statt
     untereinander (Fehler vom 15.08.2026).
     Mit einfachem Flexbox-Umbruch gibt es diese Mehrdeutigkeit nicht -
     genau das robuste Muster, das bei Betrieb/Tickets bereits
     zuverlässig funktioniert. */
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
@media (max-width: 480px) {
  #stammdatenSectionsContainer { display: block; }
  .stammdaten-nav-grid-wrap { display: block; }
  .stammdaten-nav-grid { width: 100%; }
  .stammdaten-nav-card { flex-basis: 100%; }
}
/* Versteckte Kacheln (nur für Admins, z.B. Einstellungen, Änderungs- und
   Loginprotokoll) wirklich ausblenden: "display: block" unten würde das
   hidden-Attribut sonst überstimmen - der Vorstand sah diese Kacheln
   darum bisher, obwohl sie für ihn versteckt sein sollten (gefunden beim
   Test des Loginprotokolls, 23.11.2026). */
.stammdaten-nav-card[hidden] { display: none !important; }
.stammdaten-nav-card {
  display: block;
  /* Einheitsgrösse für ALLE Kacheln in Stammdaten, Betrieb, Finanzen und
     Tickets (15.11.2026, Wunsch von Stefan). Vorher: Grundbreite 220px,
     aber Kacheln mit einem langen, nicht trennbaren Wort im Titel
     ("Einnahmen/Ausgaben-Dropdown", "Sammelbestellungen",
     "Änderungsprotokoll") wurden vom Browser breiter gemacht - die
     Kacheln waren unterschiedlich gross. Jetzt: feste Breite 249px (so
     breit, dass der längste Titel hineinpasst, und so, dass weiterhin 5
     Kacheln nebeneinander Platz haben: 5 x 249 + 4 x 16 = 1309 von
     1312px Inhaltsbreite) und eine feste Mindesthöhe, die auch der
     längste Beschreibungstext nicht überschreitet. Der seitliche
     Innenabstand ist dafür von 22 auf 18px verkleinert. */
  flex: 0 0 249px;
  box-sizing: border-box;
  min-height: 182px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 160ms, box-shadow 160ms;
  border: 2px solid transparent;
}
.stammdaten-nav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); border-color: var(--red); }
.stammdaten-nav-card.active { border-color: var(--red); background: rgba(237,28,36,0.06); }
.stammdaten-nav-card .snc-icon { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.stammdaten-nav-card h3 { margin: 0 0 6px; font-family: var(--font-heavy); font-size: 1.05rem; }
.stammdaten-nav-card p { margin: 0; font-size: 0.82rem; color: var(--text-muted); }

.stammdaten-nav-section { margin-bottom: 0; }
.stammdaten-nav-section-title {
  font-family: var(--font-heavy);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

/* ---------- Bearbeiten-Modus (nur Admin): Kacheln per Drag&Drop anordnen ---------- */
.stammdaten-nav-grid.nav-edit-mode {
  min-height: 90px;
  border: 2px dashed var(--grey-line);
  border-radius: var(--radius);
  padding: 10px;
}
.stammdaten-nav-grid.nav-edit-mode.drag-over { border-color: var(--red); background: rgba(237,28,36,0.04); }
.stammdaten-nav-card.nav-edit-mode {
  cursor: grab;
  user-select: none;
}
.stammdaten-nav-card.nav-edit-mode:hover { transform: none; border-color: var(--grey-line); }
.stammdaten-nav-card.nav-dragging { opacity: 0.4; }
.stammdaten-nav-section-title.nav-edit-mode {
  cursor: grab;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1.5px dashed var(--grey-line);
}
.stammdaten-nav-section-title.nav-edit-mode::before { content: "⠿"; font-size: 1rem; }
.stammdaten-nav-section.nav-dragging { opacity: 0.4; }
.nav-edit-actions { display: flex; align-items: center; gap: 12px; }
.nav-edit-save-hint { font-size: 0.82rem; color: var(--text-muted); }

.margin-positive { color: #1e8e3e; font-weight: 700; }
.margin-negative { color: var(--red); font-weight: 700; }

/* "Ticketpreise" -> Liste: die Tabelle hat viele Spalten (Kategorie,
   Wettbewerb, Spielort, Sektor, Preiskategorie, Quelle, Kosten,
   Verkaufspreis, Marge, Aktionen) und ist deshalb per .table-wrap
   horizontal scrollbar. Die letzte Spalte (Löschen/Ausblenden usw.)
   bleibt beim Scrollen sichtbar, statt dass man erst ganz nach rechts
   scrollen muss, um sie zu erreichen. */
#templatesTable th:last-child,
#templatesTable td:last-child {
  position: sticky;
  right: 0;
  background: var(--white);
  box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.15);
}
#templatesTable thead th:last-child { background: var(--off-white); }
#templatesTable tbody tr:hover td:last-child { background: var(--off-white); }

/* ---------- Spiele-Tabelle: schmale/zentrierte Zusatzspalten ---------- */
.admin-table th.col-narrow, .admin-table td.col-narrow { width: 66px; max-width: 66px; text-align: center; white-space: nowrap; }
.admin-table th.col-center, .admin-table td.col-center { text-align: center; }

/* ---------- Lagerbestand-Anzeige (Mehrlager: Hauptlager + Mosi) ---------- */
/* Jede Zeile (eine pro Grösse) soll die volle Breite des umgebenden
   .size-stock-grid einnehmen, statt in dessen schmale, für einfache
   Zahlen-Eingabefelder gedachte Spalten gequetscht zu werden. */
.edit-size-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--off-white);
}
.edit-size-label {
  font-weight: 700;
  min-width: 36px;
  flex: none;
}
.warehouse-breakdown { display: flex; flex-direction: column; gap: 2px; font-size: 0.84rem; }
.warehouse-breakdown-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.warehouse-breakdown-row strong { font-size: 0.76rem; color: var(--text-muted); min-width: 118px; }

/* "Bei Bestand 0"-Auswahl je Grösse (Ausverkauft/Auf Bestellung) im
   "Grössen verwalten"-Bereich - rechts neben dem Lagerbestand der
   jeweiligen Grössen-Zeile. */
.edit-size-backorder-control {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
  font-size: 0.84rem;
}
.edit-size-backorder-control label { display: flex; flex-direction: column; gap: 2px; }
.edit-size-backorder-control input[type="text"] { width: 160px; }
/* Mindestbestand je Grösse (18.11.2026) - kompakt, neben "Bei Bestand 0" */
.modal-panel form .edit-size-backorder-control input.edit-size-minstock { width: 90px; }
/* Lieferfrist je Grösse nur bei "Auf Bestellung": display:flex der Labels hat das hidden-Attribut bisher übersteuert (Feld war immer sichtbar). */
.modal-panel form .edit-size-backorder-control label[hidden] { display: none; }
/* Grössen entfernen / einblenden (24.11.2026) */
.edit-size-aktionen { flex: none; display: flex; gap: 6px; }
.edit-size-aktionen button:disabled { opacity: 0.4; cursor: not-allowed; }
.edit-size-backorder-control + .edit-size-aktionen { margin-left: 4px; }
.edit-size-ausgeblendet { opacity: 0.75; border: 1.5px dashed var(--grey-line); background: var(--white); }
.edit-size-ausgeblendet .edit-size-status { font-size: 0.82rem; color: var(--text-muted); font-style: italic; }
.edit-size-ausgeblendet .edit-size-aktionen { margin-left: auto; }
.edit-size-hinweis { grid-column: 1 / -1; margin: 0 0 4px; padding: 8px 10px; border-radius: 8px; background: #eaf3fc; border: 1.5px solid #1b6fc9; font-size: 0.84rem; color: var(--anthracite); }

/* Buchhaltung - monatlicher Auszug (Wunsch vom 23.08.2026) */
.buchhaltung-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.buchhaltung-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}
.buchhaltung-export-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.buchhaltung-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.buchhaltung-summary-card {
  background: var(--off-white);
  border-radius: 10px;
  padding: 16px 18px;
}
.buchhaltung-summary-card h4 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.buchhaltung-summary-card .buchhaltung-total {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.buchhaltung-summary-card table {
  width: 100%;
  font-size: 0.86rem;
  border-collapse: collapse;
}
.buchhaltung-summary-card table td {
  padding: 3px 0;
}
.buchhaltung-summary-card table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* ---------- Spiele-Tabelle: Platz für die Partie (15.11.2026) ----------
   Die Aktionsspalte war in EINER Zeile rund 430px breit - die Tabelle
   wurde breiter als der Bildschirm (Symbole rechts abgeschnitten) und
   "Partie" blieb mit ~130px so schmal, dass ein Spielname auf 3-4
   Zeilen umbrach. Jetzt: die Spalten Ergebnis/Zuschauer/Depot/Spende
   sind entfallen, die Zellen-Abstände enger, Runde/Datum/Zeit und die
   Partie ohne Umbruch, alle Aktionen (Tickets erstellen, Kontingente,
   3 Symbole) auf EINER Zeile. */
#spieleTable th, #spieleTable td { padding-left: 8px; padding-right: 8px; }
#spieleTable td:nth-child(1), #spieleTable td:nth-child(2), #spieleTable td:nth-child(3) { white-space: nowrap; }
#spieleTable .partie-line { white-space: nowrap; }
#spieleTable .spiele-actions { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
#spieleTable .spiele-actions .table-action-btn { margin-right: 0; white-space: nowrap; padding-left: 9px; padding-right: 9px; }

/* ---------- Kleine Knöpfe in den Verwaltungsbereichen (15.11.2026) ----------
   Wunsch von Stefan: die Knöpfe sind in Stammdaten, Betrieb, Finanzen und
   Tickets viel zu gross. Ursache ist die Grundklasse ".btn" in
   css/style.css (14px/30px Innenabstand, gedacht für die grossen Aktionen
   im Shop). Diese Datei wird nur von den vier Verwaltungsbereichen
   geladen - Shop, Kasse und Kasse-Mobile (Bedienung mit dem Finger)
   behalten deshalb ihre grossen Knöpfe. Gleiche Werte wie ".btn-sm".
   Ausgenommen: die Knöpfe über die ganze Breite (Anmeldemaske,
   ".btn-block") und die Knöpfe in der dunklen Kopfzeile
   (".btn-ghost-dark", haben eigene Masse in admin.css). */
.btn:not(.btn-block):not(.btn-ghost-dark) {
  padding: 7px 16px;
  font-size: 0.78rem;
  border-width: 1.5px;
}
/* Monats-Pfeile (◀ ▶) und das Monatsfeld daneben passend zur neuen
   Knopfhöhe, sonst stehen sie höher als "Total" und "Aktueller Monat". */
.btn.month-nav-arrow:not(.btn-block):not(.btn-ghost-dark) { padding: 7px 12px; font-size: 0.85rem; }
.month-nav-toolbar input[type="month"] { padding: 6px 10px; font-size: 0.85rem; }
/* Filter-Pillen (z.B. "Alle / Eingeblendet / Ausgeblendet", Wunsch vom
   15.11.2026): in den Verwaltungsbereichen gleich klein wie die Knöpfe.
   Im Shop bleiben sie gross (css/style.css). */
.filter-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-width: 1.5px;
}
/* Abstand unter der Filter-Leiste (Wunsch vom 15.11.2026): die 46px aus
   css/style.css sind für den Shop gedacht; mit den kleinen Pillen blieb
   in den Verwaltungsbereichen viel leerer Platz zwischen Filter und
   Tabelle. */
.filter-bar { margin-bottom: 14px; }

/* ---------- Fenster (Pop-ups) in den Verwaltungsbereichen (15.11.2026) ----------
   1) Hintergrund scrollt nicht mehr mit: solange ein Fenster offen ist,
      wird das Scrollen der Seite dahinter gesperrt; "overscroll-behavior"
      verhindert, dass das Scrollen am Ende des Fensters auf die Seite
      durchgereicht wird. "scrollbar-gutter" hält den Platz der Bildlauf-
      leiste frei, damit die Seite beim Öffnen/Schliessen nicht seitlich
      springt.
   2) Titel und das "x" zum Schliessen bleiben beim Scrollen in grossen
      Fenstern oben stehen. */
html { scrollbar-gutter: stable; }
body:has(.modal-overlay.open),
body:has(.embed-popup-overlay) { overflow: hidden; }
.modal-panel { overscroll-behavior: contain; }
.modal-panel > .modal-header {
  position: sticky;
  top: -26px;              /* Bezug ist der Inhaltsbereich von .modal-panel (26px Innenabstand oben) */
  z-index: 6;
  background: var(--white);
  margin: -26px -28px 10px;
  padding: 16px 28px 10px;
  border-bottom: 1px solid var(--grey-line);
}

/* ---------- Knöpfe in Fenstern (Pop-ups) der Verwaltungsbereiche (15.11.2026) ----------
   Wunsch von Stefan: auch "Speichern" & Co. in den Fenstern klein, wie die
   übrigen Knöpfe der Verwaltungsbereiche. Diese Knöpfe tragen ".btn-block"
   (volle Breite) und waren darum von der Regel oben ausgenommen. Innerhalb
   eines Fensters sind sie jetzt klein, nur so breit wie ihr Text und
   rechtsbündig. Unverändert gross bleiben die Knöpfe der Anmeldemaske
   (stehen nicht in einem Fenster) sowie alles in Shop und Kasse (laden
   diese Datei nicht). */
.modal-panel .btn.btn-block:not(.btn-ghost-dark) {
  display: flex;
  width: fit-content;
  margin-left: auto;
  align-self: flex-end;
  padding: 7px 16px;
  font-size: 0.78rem;
  border-width: 1.5px;
}
/* Finanzen -> Saldo: "Bestätigen" steht direkt auf der Seite, gleiche Grösse. */
#saldoConfirmBtn {
  width: fit-content;
  padding: 7px 16px;
  font-size: 0.78rem;
  border-width: 1.5px;
}
.modal-panel .btn.btn-block[hidden] { display: none; }
/* Umschalter in Fenstern (z.B. "Ausgabe / Einnahme", "Aus Liste / Manuell
   eingeben", Zahlungsart): ebenfalls kompakt. Die Grundgrösse stammt aus
   kasse.css (für die Bedienung mit dem Finger). */
.modal-panel .payment-btn { padding: 6px 10px; font-size: 0.8rem; }

/* ---------- Veranstaltungs-Formular (16.11.2026, Migration 99p) ----------
   Anmeldeoptionen als kleine Eingabetabelle: Name breit, Beträge schmal. */
.vf-optionen-table { min-width: 0; }
.vf-optionen-table th, .vf-optionen-table td { padding: 4px 6px; }
.vf-optionen-table input { width: 100%; padding: 6px 8px; font-size: 0.85rem; }
.vf-optionen-table td.vf-betrag { width: 110px; }
.vf-optionen-table td.vf-aktion { width: 36px; text-align: center; }
.vf-auswahl { display: flex; flex-direction: column; gap: 4px; }
.vf-optionen-liste { font-size: 0.8rem; line-height: 1.35; }
.vf-add-option { align-self: flex-start; }

/* ---------- Kästen in allen Fenstern der Verwaltungsbereiche (16.11.2026,
   Wunsch von Stefan: die Kästen aus "Veranstaltung"/"Spiel" durchgehend
   verwenden). Gilt für ".form-section-box" UND die älteren
   ".form-section"-Abschnitte (Artikel, Mitglied, Mannschaft, ...), damit
   alle Fenster gleich aussehen. Shop und Kasse laden diese Datei nicht. */
.modal .modal-panel .form-section,
.modal .modal-panel .form-section-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 -13px 0 -16px;
  padding: 10px 12px 12px;
  border: 1px solid var(--grey-line);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  background: var(--off-white);
}
.modal .modal-panel .form-section[hidden],
.modal .modal-panel .form-section-box[hidden] { display: none; }
.modal .modal-panel .form-section-box + .form-section-box { margin-top: 0; } /* Abstand kommt vom Formular bzw. Reiter */
.modal .modal-panel .form-section .form-section-title,
.modal .modal-panel .form-section-box .form-section-title {
  font-family: var(--font-heavy);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--anthracite);
  margin: 2px 0 0;
}
.modal .modal-panel .form-section .field-hint,
.modal .modal-panel .form-section-box .field-hint { margin: 0; }
/* Inhalt eines Reiters: Kästen untereinander mit kleinem Abstand. Unsichtbare
   Reiter bleiben (für die gleichbleibende Fensterhöhe) im Layout, siehe
   ".form-tab-panels" in admin.css. */
.modal .modal-panel .form-tab-panels > .form-tab-panel { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Reiter in Fenstern (16.11.2026): deutlicher hervorgehoben -
   graue Leiste, aktiver Reiter rot gefüllt mit weisser Schrift ---------- */
.modal .modal-panel .form-tabs {
  gap: 4px;
  padding: 4px;
  margin-bottom: 4px;
  border: 1px solid var(--grey-line);
  border-radius: 10px;
  background: var(--off-white);
}
.modal .modal-panel .form-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  font-family: var(--font-heavy);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--anthracite);
  background: transparent;
}
.modal .modal-panel .form-tab:hover { background: #fff; color: var(--anthracite); }
.modal .modal-panel .form-tab.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 6px rgba(237, 28, 36, 0.35);
}

/* ---------- Kachel "Anmeldungen" (Veranstaltungen, 16.11.2026) ---------- */
.vv-head-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vv-auswahl { max-width: 460px; margin: 0 0 10px; }
.vv-auswahl label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; }
.vv-auswahl select { padding: 7px 10px; border-radius: 8px; border: 1.5px solid var(--grey-line); font-family: inherit; font-size: 0.88rem; }
.vv-kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 8px; }
.vv-kz { background: var(--white); border: 1px solid var(--grey-line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.vv-kz span { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vv-kz strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.vv-kz-warn strong { color: #b30000; }
.vv-optionen-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 0.82rem; }
.vv-optionen-zeile:empty { display: none; }
.vv-opt-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.vv-opt { background: var(--white); border: 1px solid var(--grey-line); border-radius: 999px; padding: 2px 10px; }

/* Tabelle: ruhige Zeilen – alles oben bündig, Beträge rechtsbündig, feste Spalten */
#vvTable td, #vvTable th { vertical-align: top; }
#vvTable td { padding-top: 12px; padding-bottom: 12px; }
#vvTable .vv-col-wer { width: 20%; }
#vvTable .vv-col-betrag { text-align: right; white-space: nowrap; width: 1%; font-variant-numeric: tabular-nums; }
#vvTable td.vv-col-betrag .vv-klein { white-space: normal; min-width: 130px; margin-top: 2px; }
#vvTable .vv-col-zahlung { white-space: nowrap; width: 1%; }
#vvTable .vv-col-aktionen { text-align: right; }
.vv-wer { font-weight: 600; }
.vv-klein { font-size: 0.74rem; color: var(--text-muted); line-height: 1.35; }
.vv-typ { font-size: 0.66rem; font-weight: 500; color: var(--text-muted); background: var(--off-white); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.vv-person { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; column-gap: 10px; align-items: start; font-size: 0.84rem; padding: 0 0 6px; }
.vv-person + .vv-person { border-top: 1px dashed var(--grey-line); padding-top: 6px; }
.vv-person:last-child { padding-bottom: 0; }
.vv-person-wer { display: flex; flex-direction: column; min-width: 0; }
.vv-person-preis { white-space: nowrap; font-variant-numeric: tabular-nums; }
.vv-person.vv-storniert .vv-person-name, .vv-person.vv-storniert .vv-person-preis { text-decoration: line-through; color: var(--text-muted); }
.vv-x { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 0.72rem; line-height: 1; cursor: pointer; }
.vv-x:hover { background: #fde8e8; color: #b30000; }
#vvTable tr.row-hidden td { opacity: 1; color: var(--text-muted); }
#vvTable tr.row-hidden .vv-wer { font-weight: 500; }

/* Aktionen: feste Spalten, eine Zeile, untereinander bündig; nur «Bezahlt…» ist farbig */
.vv-aktionen { display: grid; grid-template-columns: 96px 70px 88px; gap: 6px; justify-content: end; align-items: center; }
.vv-aktionen .table-action-btn { width: 100%; margin: 0; white-space: nowrap; text-align: center; padding-left: 6px; padding-right: 6px; }
.vv-aktionen .table-action-btn.danger { border-color: var(--grey-line); background: transparent; }
.vv-aktionen .table-action-btn.danger:hover { border-color: #d92c2c; background: #fde8e8; }
#panel-veranstaltunganmeldungen .actions-cell { white-space: nowrap; width: 1%; }
.vv-nachmeldung-row td:first-child { padding-left: 22px; }
.vv-personen { display: flex; flex-direction: column; gap: 8px; }
.vv-p { background: var(--white); border: 1px solid var(--grey-line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.vv-p-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.vv-total { display: flex; justify-content: space-between; border-top: 1px solid var(--grey-line); padding-top: 8px; }
.vv-zahl-info, .vv-storno-info { margin: 0; font-size: 0.88rem; }

/* ---------- Blauer Info-Knopf im Kastentitel (17.11.2026): Erklärungen einklappbar ---------- */
.modal .modal-panel .form-section-box .sd-info-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sd-info-btn { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #1b6fc9; color: #fff; font: italic 700 0.9rem/24px Georgia, serif; padding: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.sd-info-btn.active { background: #12508f; box-shadow: 0 0 0 3px rgba(27, 111, 201, 0.25); }
.sd-info-box { padding: 8px 12px; background: #eaf3fc; border: 1.5px solid #1b6fc9; border-radius: 10px; font-size: 0.84rem; }
.sd-info-box[hidden] { display: none; }
.sd-info-box .field-hint { margin: 0 0 6px !important; }
.sd-info-box .field-hint:last-child { margin-bottom: 0 !important; }

/* ---------- Speichern-Knopf bleibt am unteren Fensterrand sichtbar (17.11.2026),
   auch wenn der Inhalt scrollt ---------- */
.modal .modal-panel form > button[type="submit"].btn-block:last-child {
  position: sticky;
  bottom: -18px;
  z-index: 5;
  box-shadow: 0 0 0 10px var(--white);
}

/* ---------- "Schloss"-Knopf: Bestände manuell pflegen (18.11.2026) ---------- */
.stock-lock-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stock-lock-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--grey-line);
  background: var(--white); font: 600 0.74rem/1.3 var(--font-body, inherit); text-transform: none; letter-spacing: 0;
  color: var(--anthracite); cursor: pointer;
}
.stock-lock-btn:hover { border-color: var(--red); }
.stock-unlocked .stock-lock-btn, .stock-lock-btn.is-unlocked { border-color: #e8762b; background: #fde6d3; color: #8a3d0a; }
.stock-lock-warning { margin: 0 0 10px; padding: 8px 12px; border: 1.5px solid #e8762b; background: #fff4e8; border-radius: 10px; font-size: 0.84rem; line-height: 1.4; }
.stock-lock-warning[hidden] { display: none; }
.warehouse-breakdown .wb-edit { display: none; align-items: center; gap: 4px; flex-wrap: wrap; }
.stock-unlocked .warehouse-breakdown .wb-edit { display: inline-flex; }
.stock-unlocked .warehouse-breakdown .wb-view { display: none; }
.modal-panel form .warehouse-breakdown input.wb-input { width: 72px; padding: 3px 6px; font-size: 0.84rem; border: 1.5px solid #e8762b; border-radius: 6px; }
.stock-unlocked .warehouse-breakdown { gap: 6px; }

/* ======================================================================
   Konfigurierbare Artikel, Farben (Migration 99v, 22.11.2026)
   Präfix "kf-" (vorher geprüft: in admin.css/style.css nicht vergeben).
   ====================================================================== */
/* Farbpunkt */
.kf-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); vertical-align: -2px; margin-right: 6px; flex: none; }
.kf-dot-bunt { background: conic-gradient(#e30613, #ffd500, #2eb84b, #1a73e8, #9b2fc9, #e30613); }
.kf-art-chip { margin-left: 4px; }
.kf-art-baustein { background: #eef1f4; color: #4a5560; }
.kf-art-konfig { background: #e7f0fd; color: #1558b0; }
/* Rohling (Migration 99ze, 23.11.2026) - eigene, von Baustein
   unterscheidbare Farbe (gelblich statt grau) */
.kf-art-rohling { background: #fbf0d9; color: #8a6412; }

/* ---------- Artikelart-Reiter in der Artikel-Übersicht (23.11.2026) ----------
   Wiederverwendet die Reiter-Optik des Artikel-Formulars (.form-tabs/
   .form-tab, siehe admin.css), hier aber ohne den sonst üblichen
   margin-bottom (direkt gefolgt vom erklärenden Hinweistext statt vom
   Formularinhalt) und mit einer kleinen Zahl je Reiter. */
/* Anders als die Formular-Reiter (.form-tabs, nur wenige, feste Reiter
   nebeneinander) soll diese Leiste nie seitlich wegscrollen - bei vier
   Reitern mit unterschiedlich langen Namen (v.a. "Konfigurierbar")
   würde das auf dem Handy sonst Reiter ausser Sicht schieben, ohne dass
   das zu sehen wäre. Deshalb hier bewusst umbrechend statt scrollend. */
.artikelart-tabs { margin-bottom: 4px; flex-wrap: wrap; overflow-x: visible; }
/* Verhindert ruckartiges Springen der Seite beim Wechsel zwischen den
   Artikelart-Reitern (23.11.2026, siehe artikelTableHoeheSichern() in
   stammdaten.js): sanfter Übergang statt hartem Sprung, falls die
   Mindesthöhe der Tabelle wächst. */
#panel-artikel .table-wrap { transition: min-height 0.15s ease; }
.artikelart-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--off-white);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
}
.form-tab.active .artikelart-tab-count { background: var(--red); color: var(--white); }

/* Kachel Farben */
#farbenTable td:first-child, #farbenTable th:first-child { text-align: right; color: var(--text-muted); }
#farbenTable tbody tr { cursor: pointer; }
.kf-regel-add { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.kf-regel-add label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 600; }
.kf-regel-add select { padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--grey-line); font-family: inherit; font-size: 0.85rem; min-width: 130px; }
#panel-farben .checkbox-row { margin: 4px 0; }
#panel-farben .dropdown-priority-box .field-hint { margin: 0 0 6px; }
#panel-farben .admin-table, .kf-farbregeln.admin-table { min-width: 0; }
#farbenTable .actions-cell, #farbRegelnTable .actions-cell { text-align: right; }

/* Fenster Farbe */
.kf-farbpunkt-feld { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 600; }
.kf-farbwahl { display: flex; align-items: center; gap: 12px; }
.kf-farbwahl input[type="color"] { width: 46px; height: 34px; padding: 2px; border: 1.5px solid var(--grey-line); border-radius: 8px; background: #fff; cursor: pointer; }
.kf-farbwahl input[type="color"]:disabled { opacity: 0.35; cursor: default; }
.modal-panel form input.kf-kuerzel-input { text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.03em; }

/* Artikel-Fenster: Artikelart */
.pf-artikelart-hint { align-self: center; margin: 0; }
.pf-konfig-text { margin: 0; font-size: 0.85rem; line-height: 1.45; }

/* Fenster Konfiguration */
.modal.modal-konfig { max-width: 1180px; }
.kf-panel { display: flex; flex-direction: column; gap: 12px; }
.kf-panel[hidden] { display: none; }
.kf-tab-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.12); font-size: 0.68rem; line-height: 18px; }
.kf-tab-badge:empty { display: none; }
.modal .modal-panel .form-tab.active .kf-tab-badge { background: rgba(255, 255, 255, 0.3); }
.kf-mind { align-self: center; }
.kf-groessen { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-panel form label.kf-groesse { align-items: center !important; gap: 5px !important; padding: 4px 10px; border: 1.5px solid var(--grey-line); border-radius: 999px; background: #fff; font-weight: 600 !important; color: var(--anthracite) !important; cursor: pointer; }
.modal-panel form label.kf-groesse input { margin: 0; }
.modal-panel form label.kf-groesse:has(input:checked) { border-color: var(--red); background: #fdecec; }
.kf-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kf-leer { margin: 0; padding: 10px 12px; font-size: 0.84rem; color: var(--text-muted); background: var(--off-white); border: 1px dashed var(--grey-line); border-radius: 10px; }

.kf-gruppe-kopf { display: flex; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; }
.kf-typ { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--anthracite); color: #fff; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.kf-typ-druck { background: #1a73e8; }
.modal-panel form .kf-gruppe-kopf input[type="text"] { padding: 6px 9px; font-size: 0.88rem; font-family: var(--font-body, inherit); font-weight: 600; }
.modal-panel form .kf-gruppe-kopf input[data-gf="name"] { flex: 1 1 auto; min-width: 140px; }
.modal-panel form .kf-gruppe-kopf input[data-gf="kuerzel"] { flex: 0 0 110px; width: 110px; }
.kf-gruppe-aktionen { display: flex; gap: 4px; flex: none; }
.kf-icon-btn { width: 26px; height: 26px; padding: 0; border: 1.5px solid var(--grey-line); border-radius: 7px; background: #fff; color: var(--anthracite); font-size: 0.8rem; line-height: 1; cursor: pointer; }
.kf-icon-btn:hover:not(:disabled) { border-color: var(--anthracite); }
.kf-icon-btn:disabled { opacity: 0.35; cursor: default; }
.kf-icon-btn.danger:hover { border-color: #d92c2c; background: #fde8e8; color: #b30000; }
.kf-optionen-wrap { overflow-x: auto; }
.kf-optionen { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 900px; }
.kf-optionen th { text-align: left; font-size: 0.68rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 4px 4px; white-space: nowrap; }
.kf-optionen td { padding: 3px 4px; vertical-align: middle; }
.modal-panel form .kf-optionen input, .modal-panel form .kf-optionen select { padding: 5px 7px; font-size: 0.8rem; border-radius: 6px; }
.kf-optionen td:nth-child(3) { width: 90px; }
.kf-optionen td:nth-child(5) { width: 90px; }
.kf-optionen td:nth-child(4) { width: 120px; }
.kf-optionen .kf-aktionen { white-space: nowrap; width: 92px; text-align: right; }
.kf-optionen tr.kf-ohne td { color: var(--text-muted); font-style: italic; padding: 4px 6px; }

.kf-preisregel { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 8px 10px; background: #fff; border: 1px solid var(--grey-line); border-radius: 8px; }
.modal-panel form .kf-preisregel input[data-rf="bezeichnung"] { flex: 1 1 200px; width: auto; padding: 6px 9px; font-size: 0.85rem; }
.kf-regel-gruppen { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-bottom: 6px; }
.modal-panel form .kf-regel-betrag { flex: 0 0 120px; font-size: 0.74rem !important; }
.modal-panel form .kf-regel-betrag input { padding: 6px 9px; font-size: 0.85rem; }
.kf-preisregel .kf-icon-btn { margin-bottom: 4px; }
.kf-global-regeln { font-size: 0.82rem; padding: 6px 10px; background: #fff; border: 1px solid var(--grey-line); border-radius: 8px; }
.kf-farbregeln { margin: 0; }
.modal-panel .kf-regel-add select { padding: 6px 8px; }

.kf-platzhalter { display: flex; flex-wrap: wrap; gap: 6px; }
.kf-ph { padding: 3px 9px; border: 1.5px solid #1a73e8; border-radius: 999px; background: #eef4fd; color: #1558b0; font: 600 0.76rem/1.3 ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.kf-ph:hover { background: #dce9fb; }
.modal-panel form [data-kf-vorlage]::placeholder { color: #9aa3ab; }
.kf-text-dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; font-size: 0.86rem; }
.kf-text-dl dt { font-weight: 700; color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.kf-text-dl dd { margin: 0; }
.kf-pre { white-space: pre-wrap; }
.kf-warn-text { color: #b30000; }

.kf-stand-box { padding: 8px 12px; border-radius: 10px; font-size: 0.86rem; line-height: 1.5; border: 1.5px solid var(--grey-line); background: var(--off-white); }
.kf-stand-box .btn { margin-left: 6px; }
.kf-stand-ok { border-color: #2f9e52; background: #e9f7ee; }
.kf-stand-warn { border-color: #e8762b; background: #fff4e8; }
.kf-stand-vorschau { border-color: #1a73e8; background: #eef4fd; }
.kf-warn-list { margin: 0; padding: 6px 12px 6px 28px; font-size: 0.82rem; background: #fff8e1; border: 1px solid #f0d27a; border-radius: 10px; }
.kf-warnungen:empty { display: none; }
.kf-filter { margin-bottom: 0; }
.kf-raster td { vertical-align: top; }
.kf-raster .kf-col-preis { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.kf-raster .kf-col-aktiv { text-align: center; width: 1%; }
.kf-auswahl { display: flex; flex-wrap: wrap; gap: 4px; }
.kf-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--grey-line); font-size: 0.78rem; white-space: nowrap; }
.kf-chip .kf-dot { width: 11px; height: 11px; margin-right: 5px; }
.kf-chip-druck { background: #eef4fd; border-color: #c3d8f6; }
.kf-chip-druck .kf-dot { margin-left: 5px; }
.kf-konfig-btn { white-space: normal; line-height: 1.25; text-align: left; max-width: 96px; }
.kf-chip-ohne { color: var(--text-muted); border-style: dashed; }
.kf-row-aus .kf-chip { opacity: 0.6; }
.kf-row-aus td { color: var(--text-muted); }
.kf-status { display: inline-block; margin: 0 4px 3px 0; padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; }
.kf-status-ok { background: #e9f7ee; color: #1e7a3c; }
.kf-status-nein { background: #fde8e8; color: #9c1c1c; }
.kf-size { display: inline-block; margin: 0 3px 3px 0; padding: 1px 7px; border-radius: 6px; font-size: 0.74rem; font-weight: 700; }
.kf-size.ok { background: #e9f7ee; color: #1e7a3c; }
.kf-size.nein { background: #eef1f4; color: #8a939b; text-decoration: line-through; }
.kf-size-grund { font-size: 0.72rem; color: var(--text-muted); max-width: 260px; }
.kf-aufschlag { font-size: 0.7rem; color: var(--text-muted); line-height: 1.35; margin-top: 2px; }
.kf-details { margin-top: 4px; font-size: 0.78rem; }
.kf-details summary { cursor: pointer; color: #1558b0; font-size: 0.74rem; }
.kf-details-text { margin: 4px 0; font-weight: 600; }
.kf-details-table { border-collapse: collapse; font-size: 0.74rem; }
.kf-details-table th, .kf-details-table td { text-align: left; padding: 2px 8px 2px 0; vertical-align: top; }
.kf-details-table th { color: var(--text-muted); font-weight: 700; }
.kf-details-table tr.kf-nein td { color: var(--text-muted); }

/* ---------- Konfiguration: Reiter «Bilder» (Etappe 5, 23.11.2026) ---------- */
.kf-bildseite { width: auto; min-width: 0; flex: 0 0 auto; font-size: 0.8rem; padding: 5px 8px; }
.kf-bilder-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.kf-datei-btn { cursor: pointer; }
.kf-datei-btn.disabled { opacity: 0.45; pointer-events: none; }
.kf-bilder td { vertical-align: middle; }
.kf-bild-zelle { width: 64px; }
.kf-bild-zelle img { width: 56px; height: 56px; object-fit: contain; background: #f4f4f4; border-radius: 8px; display: block; }
.kf-bild-fehlt { display: inline-block; width: 56px; height: 56px; line-height: 56px; text-align: center; font-size: 0.72rem; color: var(--text-muted); border: 1.5px dashed var(--grey-line); border-radius: 8px; }
.kf-ansicht { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: #eef4fd; color: #1a4fa0; white-space: nowrap; }
.kf-ansicht-back { background: #f3eefc; color: #5b3aa0; }
.kf-ansicht-kombi { background: #fff4e8; color: #8a4b00; }
.kf-grundbild-text { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.kf-grundbild td { background: #fafafa; }
.kf-dateiname { font-size: 0.78rem; word-break: break-all; }
.kf-col-anzahl { text-align: right; width: 1%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kf-bild-aktionen { white-space: nowrap; text-align: right; }
.kf-bilder-import { border: 1.5px solid #1a73e8; background: #eef4fd; border-radius: 12px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.kf-import-warn { color: #b35c00; font-weight: 600; }
.kf-import-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.kf-import-karte { display: flex; gap: 8px; align-items: center; background: var(--white); border: 1px solid var(--grey-line); border-radius: 10px; padding: 6px; min-width: 0; }
.kf-import-karte img { width: 48px; height: 48px; object-fit: contain; background: #f4f4f4; border-radius: 6px; flex: 0 0 auto; }
.kf-import-karte > div { min-width: 0; }
.kf-import-karte code { font-size: 0.72rem; word-break: break-all; }
.kf-import-ersetzt { border-color: #e8762b; }
.kf-import-text { font-size: 0.72rem; color: var(--text-muted); }
.kf-import-unbekannt { font-size: 0.78rem; color: #8a4b00; }
.kf-import-unbekannt code { margin-right: 4px; }
.kf-import-knoepfe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kf-import-fortschritt { font-size: 0.8rem; color: var(--text-muted); }
.kf-bilder-import[hidden] { display: none; }

/* Einstellungen: Mails ein-/ausschalten (25.11.2026) */
.mail-schalter-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mail-schalter { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 400; }
.mail-schalter input { width: 18px; height: 18px; flex: none; margin: 0; }


/* Veranstaltungsbild: Ausschnitt wählen (25.11.2026). Rahmen im Kartenformat
   des Shops (16:9); Darstellung wie im Shop (object-position + Zoom mit
   gleichem Bezugspunkt, siehe js/member-veranstaltungen.js). */
.vf-bild-rahmen {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1.5px dashed var(--grey-line);
  background: var(--off-white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
}
.vf-bild-rahmen span { font-size: 0.76rem; color: var(--text-muted); }
.vf-bild-rahmen img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  cursor: grab;
}
.vf-bild-rahmen img[hidden] { display: none; }
.vf-bild-rahmen.zieht img { cursor: grabbing; }
.vf-bild-zoom { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; }
.vf-bild-zoom[hidden] { display: none; }
.modal-panel form .vf-bild-zoom label:not(.checkbox-row):not(.role-checkbox-card) { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.vf-bild-zoom input[type="range"] { width: 180px; }
.vf-bild-aufloesung { font-size: 0.76rem; color: var(--text-muted); margin: 0; }
.vf-bild-aufloesung[hidden] { display: none; }
.vf-bild-aufloesung.warn { color: #9a6200; }

/* ---------- Einstellungen: Anordnung und Ladenschild (25.11.2026) ---------- */
.einst-zeile { display: grid; gap: 20px; margin-top: 20px; align-items: start; }
.einst-zeile > .dropdown-priority-box { margin-top: 0 !important; max-width: none !important; min-width: 0; }
/* 1. Zeile: Kasten «Shop» und daneben das Ladenschild - halb/halb, gleiche
   Höhe (das Schild passt sich dem Kasten an; Schild-Stil: css/ladenschild.css). */
.einst-zeile-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.einst-zeile-shop > .ladenschild { min-height: 0; height: 100%; }
/* 2. Zeile: «Mails ein-/ausschalten» links, «Bestell-Benachrichtigungen» rechts */
/* «Mails ein-/ausschalten» breiter als «Bestell-Benachrichtigungen» (29.11.2026,
   Wunsch Stefan): so haben Mailart und die zwei Sperr-Knöpfe auf einer Linie Platz. */
.einst-zeile-mails { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1000px) {
  .einst-zeile-mails { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .einst-zeile-shop { grid-template-columns: minmax(0, 1fr); }
}
.einst-titel { display: flex; align-items: center; gap: 8px; }
.dropdown-priority-box .sd-info-box { margin: 0 0 10px; }


/* ---------- Sammel-Sektor (26.11.2026): Hinweiszeile in der Auswahlliste "Sektor" + Fenster ---------- */
.dp-sammel-info { margin-top: 3px; font-size: 0.76rem; line-height: 1.35; color: var(--text-muted); }
.dp-sammel-chip { display: inline-block; padding: 1px 7px; border: 0; border-radius: 999px; background: #1b6fc9; color: #fff; font-family: inherit; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em; cursor: pointer; }
.dp-sammel-chip[aria-expanded="true"] { background: #12508f; }
.dp-sammel-text { margin-top: 3px; }
.dp-sammel-text[hidden] { display: none; }
.dp-sammel-btn { display: block; margin: 0 auto 4px; background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px; } /* über dem Zusammenführen-Knopf, damit die Spalte "Wert" ihre Breite behält */
.dp-sammel-btn:hover { opacity: 0.7; }
.sektor-sammel-liste { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Artikel-Reiter anordnen (26.11.2026) ---------- */
.artikel-tab-order-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 26px; margin: 2px 0 6px; }
.artikel-tab-order-bar .field-hint { margin: 0; }
.artikelart-tabs.is-ordering { gap: 6px; }
.artikel-tab-order-item { display: inline-flex; align-items: center; border: 1px dashed var(--grey-line); border-radius: 8px; padding: 0 2px; }
.artikel-tab-move { width: 24px; height: 24px; border: 1px solid var(--grey-line); border-radius: 6px; background: var(--white); color: var(--anthracite); font-size: 1rem; line-height: 1; cursor: pointer; }
.artikel-tab-move:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.artikel-tab-move:disabled { opacity: 0.3; cursor: default; }

/* ---------- Einstellungen: Sichtbarkeit nach Rolle (28.11.2026) ---------- */
.sichtbar-tabelle { width: 100%; border-collapse: collapse; margin-top: 10px; }
.sichtbar-tabelle th, .sichtbar-tabelle td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--grey-line); font-size: 0.85rem; }
.sichtbar-tabelle th { font-weight: 600; color: var(--text-muted); font-size: 0.78rem; }
.sichtbar-tabelle th:first-child, .sichtbar-tabelle td:first-child { text-align: left; font-weight: 600; }
.sichtbar-tabelle input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.sichtbar-tabelle .sichtbar-stand { text-align: left; font-weight: 400; color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }
.sichtbar-tabelle .sichtbar-stand.eingeschraenkt { color: #8a6d00; font-weight: 600; }

/* Sichtbarkeit pro Artikel (Etappe 2, 28.11.2026) */
.pf-sichtbar-rollen { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 8px 26px; }
.pf-sichtbar-rollen[hidden] { display: none; }
.pf-sichtbar-rollen .checkbox-row { margin: 0; }
.stock-chip.sichtbar-test-chip { background: #ffd84d; color: #1a1a1a; border: 1px dashed #1a1a1a; font-weight: 800; letter-spacing: 0.06em; }

/* Legenden (28.11.2026) */
.pf-legende-zeit { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 6px 0 8px 26px; }
.pf-legende-zeit[hidden] { display: none; }
.modal-panel form .pf-legende-zeit label:not(.checkbox-row):not(.role-checkbox-card) { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.pf-legende-zeit input[type="month"] { width: auto; }
.stock-chip.legende-chip { background: #5a5a5a; color: #fff; }
.pf-legende-zeit label[hidden] { display: none !important; }
/* Reiter «Legenden» in Stammdaten -> Artikel: ganz rechts, mit Trennstrich abgesetzt */
#artikelartTabs .artikel-tab-legenden { margin-left: auto; position: relative; color: #5a5a5a; }
#artikelartTabs .artikel-tab-legenden::before { content: ""; position: absolute; left: -4px; top: 6px; bottom: 6px; border-left: 2px solid var(--grey-line); }

/* Eigenes Vorschaubild einer Veranstaltung (29.11.2026): gleicher 16:9-Rahmen,
   das Bild füllt ihn ganz - kein Verschieben, kein Zoom. */
.vf-vorschau-rahmen { cursor: default; }
.vf-vorschau-rahmen img { cursor: default; width: 100%; height: 100%; left: 0; top: 0; object-fit: cover; object-position: 50% 50%; }
.vf-vorschau-rahmen span { padding: 0 14px; text-align: center; }
.vf-vorschau-aktiv { color: #9a6200; }
.vf-vorschau-aktiv[hidden] { display: none; }

/* Mitglieder: Filter nach Rolle (29.11.2026) - zweite, etwas kleinere Zeile */
.filter-bar-rollen { margin-top: -6px; }
.filter-bar-rollen .filter-btn { font-size: 0.74rem; padding: 6px 12px; }
.filter-bar-rollen .filter-anzahl { opacity: 0.65; font-weight: 600; margin-left: 2px; }

/* Zeitraum-Filter Monat / Jahr / Total (29.11.2026) - gemeinsames Bedienelement
   aller Finanzen-Bereiche (zeitraumWahl() in finanzen/finanzen.js) */
.zeitraum-wahl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zeitraum-modus { display: inline-flex; gap: 6px; padding-right: 12px; margin-right: 2px; border-right: 2px solid var(--grey-line); }
.zeitraum-wahl .zeitraum-modus .btn { padding: 7px 14px; font-size: 0.8rem; }
.zeitraum-wahl .zeitraum-feld, .buchhaltung-toolbar .zeitraum-wahl .zeitraum-feld { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-size: 0.82rem; font-weight: 600; }
.zeitraum-wahl .zeitraum-feld[hidden], .buchhaltung-toolbar .zeitraum-wahl .zeitraum-feld[hidden] { display: none; }
.zeitraum-wahl input[type="month"], .zeitraum-wahl input[type="number"] { padding: 6px 10px; font-size: 0.85rem; }
.zeitraum-wahl input[type="number"] { width: 92px; }
.zeitraum-summe { font-size: 0.86rem; color: var(--text-muted); margin-left: auto; }
.zeitraum-summe strong { color: var(--black); }

/* Auswertungen (Finanzen, 29.11.2026): Renner/Penner, Umsatz pro Kunde/Verkäufer */
.aw-info-btn { width: 22px; height: 22px; border-radius: 50%; border: none; background: #2f6fd6; color: #fff; font-weight: 700; font-size: 0.78rem; cursor: pointer; line-height: 1; vertical-align: middle; margin-left: 6px; }
.aw-info { max-width: 980px; }
.aw-info[hidden] { display: none; }
.aw-info p { font-size: 0.84rem; margin: 0 0 8px; }
.aw-info p:last-child { margin-bottom: 0; }
.aw-sortzeile { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; }
.aw-sortzeile .filter-bar { margin: 0; }
.aw-hinweis { font-size: 0.82rem; color: #9a6200; margin: 0 0 10px; text-align: center; }
.aw-hinweis[hidden] { display: none; }
.aw-table .aw-zahl { text-align: right; white-space: nowrap; }
.aw-table .aw-rang { width: 1%; text-align: center; color: var(--text-muted); }
.aw-table th.aw-gruppe { text-align: center; border-bottom: 1.5px solid var(--grey-line); }
.aw-table td.aw-aktiv { font-weight: 700; }
.aw-table td.aw-zwischen { background: rgba(0, 0, 0, 0.025); font-weight: 600; }
.aw-table tr.aw-summe td { font-weight: 700; background: var(--off-white); border-bottom: 2px solid var(--grey-line); }
.aw-table tr.aw-null td { color: var(--text-muted); }
.aw-table th[data-aw-sort] { cursor: pointer; user-select: none; }
.aw-table th[data-aw-sort]:hover { color: var(--black); }
.aw-table th.aw-sort-aktiv[data-aw-pfeil="ab"]::after { content: " ▼"; font-size: 0.7em; }
.aw-table th.aw-sort-aktiv[data-aw-pfeil="auf"]::after { content: " ▲"; font-size: 0.7em; }
.aw-table.aw-ohne-kasse-alt .aw-kasse-alt { display: none; }
.aw-chip-penner { background: #fff3e0; color: #9a6200; }
.aw-ep { width: 84px; padding: 4px 6px; font-size: 0.82rem; text-align: right; border: 1.5px solid var(--grey-line); border-radius: 6px; background: var(--white); }
.aw-ep.aw-ep-fehlt { border-color: #e0a030; background: #fffaf0; }

/* Auswertung «Umsatz pro Verkäufer»: Hauptzeile je Person, darunter die Kanäle */
.aw-table tr.aw-haupt td { border-top: 2px solid var(--grey-line); font-weight: 600; }
.aw-table tr.aw-kanal td { font-size: 0.84rem; color: var(--text-muted); padding-top: 6px; padding-bottom: 6px; border-top: none; }
.aw-table tr.aw-kanal td:nth-child(3) { padding-left: 22px; position: relative; }
.aw-table tr.aw-kanal td:nth-child(3)::before { content: "↳"; position: absolute; left: 6px; opacity: 0.6; }

/* ---------- Gleitender Einstandspreis (29.11.2026, Wunsch Stefan, Migration 99zx) ---------- */
/* Betrieb -> Lagerbewegungen: Einkaufspreis-Felder beim Wareneingang */
.ep-eingang { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; padding: 12px 14px; border: 1.5px solid #1b6fc9; border-radius: 10px; background: #f5f9fe; }
.ep-eingang[hidden] { display: none; }
.ep-eingang-titel { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: var(--anthracite); }
.ep-eingang-intern { font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #e3e8ef; color: #48566a; }
.ep-eingang-oder { align-self: flex-end; padding-bottom: 11px; font-size: 0.8rem; color: #6b7686; }
.ep-eingang .sd-info-box { flex-basis: 100%; }
.ep-eingang input { width: 150px; }
#movementsTable .sm-ep { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Stammdaten -> Artikel -> «Preis & Bild»: Übersicht je Grösse und Wareneingänge.
   Lange Listen bekommen einen Scrollbalken, der Tabellenkopf bleibt stehen. */
.ep-scroll { max-height: 216px; overflow-y: auto; border: 1px solid var(--grey-line); border-radius: 8px; }
.ep-table { width: 100%; margin: 0; font-size: 0.82rem; }
.ep-table th { position: sticky; top: 0; z-index: 1; background: #f5f3f0; }
.ep-table th, .ep-table td { padding: 6px 10px; }
.ep-table .aw-zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* das Formular macht Eingabefelder sonst volle Breite und gross */
.modal-panel form .ep-table input.aw-ep { width: 104px; display: inline-block; padding: 4px 6px; font-size: 0.82rem; text-align: right; }
.ep-untertitel { margin: 4px 0 0; }
.ep-text { margin: 0; font-size: 0.84rem; }
.ep-fehlt { color: #b26a00; font-weight: 600; }
.ep-gilt { color: #6b7686; white-space: nowrap; }
.ep-ohne { color: #b26a00; }
/* Finanzen -> Auswertungen: Durchschnitt der verkauften Stück unter dem Eingabefeld */
.aw-ep-schnitt { display: block; margin-top: 2px; font-size: 0.74rem; color: #6b7686; white-space: nowrap; }
.aw-ep-text { color: #6b7686; font-size: 0.8rem; }

/* ---------- Lager buchen: vier Knöpfe, Bereiche darunter (29.11.2026, Wunsch Stefan) ---------- */
.lager-aktionen { margin: 0 0 14px; }
.lager-bereich[hidden] { display: none; }
.lager-bereich-hint { margin: 0 0 10px; }
.lager-bereich .form-message { margin-top: 10px; }

/* ---------- Finanzen -> Auswertungen: Abschreibungen und Bestandsdifferenzen (29.11.2026) ---------- */
.aw-text { margin: 0 0 10px; font-size: 0.86rem; color: #48566a; text-align: center; }
.aw-untertitel { margin: 22px 0 8px; font-size: 0.95rem; }
/* lange Listen: Scrollbalken, Tabellenkopf bleibt stehen */
.aw-scroll { max-height: 420px; overflow-y: auto; }
/* der ganze Kopf bleibt stehen - samt der Total-Zeile der Buchungen darunter */
.aw-scroll thead { position: sticky; top: 0; z-index: 1; }
.aw-scroll thead th { background: #f5f3f0; }
.aw-scroll thead tr.aw-summe td { background: #f5f3f0; font-weight: 700; border-bottom: 1.5px solid var(--grey-line); }
.aw-scroll thead tr.aw-summe[hidden] { display: none; }

/* ---------- Mails ein-/ausschalten: temporäre und dauerhafte Sperre (29.11.2026, Wunsch Stefan) ---------- */
.mail-schalter-alle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--grey-line); }
.mail-schalter-periode { font-size: 0.82rem; color: #48566a; }
.mail-schalter-alle-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-schalter-alle-knoepfe .table-action-btn { margin: 0; }
.mail-schalter-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.mail-sperre { display: inline-flex; gap: 4px; }
.mail-sperre-btn { padding: 3px 9px; border-radius: 999px; border: 1.5px solid var(--grey-line); background: #fff; color: #48566a; font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mail-sperre-btn:hover { border-color: #9aa3ad; }
.mail-sperre-btn:disabled { opacity: 0.6; cursor: default; }
/* gewählte Art: temporär orange, dauerhaft rot */
.mail-sperre-btn.aktiv[data-mail-modus="temporaer"] { background: #FFF1D6; border-color: #E0A030; color: #7a4a00; }
.mail-sperre-btn.aktiv[data-mail-modus="dauerhaft"] { background: #FCE4E1; border-color: #c0392b; color: #8f2318; }

/* ---------- Automatische Mail-Sperre ab einer Anzahl (29.11.2026, Wunsch Stefan) ---------- */
.mail-auto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--grey-line); font-size: 0.86rem; }
.mail-auto label { font-weight: 600; margin: 0; }
.mail-auto input { width: 76px; padding: 4px 6px; font: inherit; font-size: 0.86rem; text-align: right; border: 1.5px solid var(--grey-line); border-radius: 6px; }
.mail-auto .table-action-btn { margin: 0; }
.mail-auto-stand { margin-left: auto; font-size: 0.8rem; color: #48566a; white-space: nowrap; }
.mail-auto-aktiv { margin: 10px 0 0; padding: 8px 12px; border: 1.5px solid #E0A030; border-radius: 10px; background: #FFF6E3; color: #7a4a00; font-size: 0.84rem; font-weight: 600; }
.mail-auto-aktiv[hidden] { display: none; }
.mail-auto-chip { padding: 2px 8px; border-radius: 999px; background: #FFF1D6; border: 1.5px solid #E0A030; color: #7a4a00; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
/* Mailart und Sperr-Knöpfe auf einer Linie halten, solange der Platz reicht */
.mail-schalter-zeile .mail-schalter { flex: 1 1 auto; min-width: 0; }
.mail-sperre { flex: none; }
