/* RUESS Hub 3.5.0 - Stickauftraege (public/stickauftraege.js, Seite nutzt die ta-*-Bausteine von Traeger abmelden), Formular-Fenster (public/formular-dialog.js)
   und Emblem-/Neuer-Traeger-Teile der Anprobeliste. Nur Tokens aus ruess-design-system.css. */
.st-stick .st-auswahl { margin: 0 0 var(--ds-space-3); }
.st-stick .st-auswahl .ap-hint { margin: 0 var(--ds-space-2) 0 0; }
.st-stick .st-tabelle td.st-text { font-weight: 600; white-space: normal; min-width: 160px; }
.st-stick .st-regel-text { flex: 1 1 320px; margin: 0; }
.st-stick h5 { margin: var(--ds-space-5) 0 var(--ds-space-2); font-size: var(--ds-font-sm); }
.st-stick .st-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--ds-space-3); margin-bottom: var(--ds-space-3); }
.st-stick .st-kachel { border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); padding: var(--ds-space-3) var(--ds-space-4); background: var(--ds-surface); display: flex; flex-direction: column; gap: var(--ds-space-1); min-width: 0; }
.st-stick .st-kachel-titel { color: var(--ds-muted); font-size: var(--ds-font-xs); }
.st-stick .st-kachel b { font-size: var(--ds-font-xl); color: var(--ds-ink); }

/* Formular-Fenster am document.body: eigene, eng gescopte Regeln (globaler Hub-Stil macht Knoepfe sonst breit und gruen) */
.ap-modal.ruess-formular { position: fixed; inset: 0; z-index: var(--z-modal-nested, 10020); display: flex; align-items: flex-start; justify-content: center; padding: 8vh var(--ds-space-4) var(--ds-space-4); background: rgba(23, 32, 28, .38); overflow: auto; box-sizing: border-box; }
.ap-modal.ruess-formular .ap-dialog { width: min(560px, 100%); max-height: calc(100vh - 16vh); overflow-y: auto; box-sizing: border-box; border-radius: var(--ds-radius-xl); background: var(--ds-surface); box-shadow: var(--ds-shadow-3); color: var(--ds-text); }
.ap-modal.ruess-formular .ap-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-3); padding: var(--ds-space-4) var(--ds-space-5); border-bottom: 1px solid var(--ds-line); }
.ap-modal.ruess-formular .ap-dialog > header h3 { margin: 0; font-size: var(--ds-font-lg); color: var(--ds-ink); }
.ap-modal.ruess-formular .ap-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-3); padding: var(--ds-space-4) var(--ds-space-5) var(--ds-space-5); margin: 0; }
.ap-modal.ruess-formular .ap-form > label { display: flex; flex-direction: column; gap: var(--ds-space-1); font-size: var(--ds-font-xs); color: var(--ds-muted); min-width: 0; }
.ap-modal.ruess-formular .ap-form > .we-full { grid-column: 1 / -1; }
/* 3.7.15: Haken-Felder im Formular-Dialog (Anprobeliste erstellen) */
.ap-modal.ruess-formular .ap-form > label.ruess-haken { flex-direction: row; align-items: center; gap: var(--ds-space-2); min-height: var(--ds-h-sm); cursor: pointer; }
.ap-modal.ruess-formular .ap-form > label.ruess-haken input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--ds-focus); }
.ap-modal.ruess-formular .ap-form :is(input, select) { height: var(--ds-h-form); box-sizing: border-box; width: 100%; padding: 0 var(--ds-space-3); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); background: var(--ds-surface); color: var(--ds-text); font: inherit; font-size: var(--ds-font-sm); }
.ap-modal.ruess-formular .ap-form :is(input, select):focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 1px; }
.ap-modal.ruess-formular .ap-hint { margin: 0; color: var(--ds-muted); font-size: var(--ds-font-xs); }
.ap-modal.ruess-formular .ap-error { margin: 0; color: var(--ds-danger); font-size: var(--ds-font-sm); }
html body .ap-modal.ruess-formular .ap-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ds-space-2); }
html body .ap-modal.ruess-formular .ap-actions > button.ap-btn,
html body .ap-modal.ruess-formular .ap-dialog > header > button.ap-icon-btn { width: auto; flex: 0 0 auto; min-width: 0; margin: 0; }
html body .ap-modal.ruess-formular .ap-dialog > header > button.ap-icon-btn { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: var(--ds-font-lg); }
/* Knopf-Arten wie ui-2026 (Fenster liegt ausserhalb #appBox): Nebenaktion weiss mit Kontur, Hauptaktion Lime mit Anthrazit, Symbol ohne Flaeche */
html body .ap-modal.ruess-formular button.ap-btn { height: 36px !important; min-height: 36px !important; padding: 0 var(--ds-space-4) !important; border-radius: var(--ds-radius-md) !important; font: inherit !important; font-size: var(--ds-font-sm) !important; font-weight: 600 !important;
  background: var(--ds-surface) !important; color: var(--ds-ink) !important; border: 1px solid var(--ds-line-strong) !important; box-shadow: none !important; cursor: pointer; transition: background-color var(--ds-dur-fast) var(--ds-ease), transform var(--ds-dur-fast) var(--ds-ease); }
html body .ap-modal.ruess-formular button.ap-btn:hover { background: var(--ds-surface-hover) !important; }
html body .ap-modal.ruess-formular button.ap-btn.primary { background: var(--ds-brand) !important; color: var(--ds-on-brand) !important; border-color: var(--ds-brand) !important; }
html body .ap-modal.ruess-formular button.ap-btn.primary:hover { background: var(--ds-brand-hover) !important; }
html body .ap-modal.ruess-formular button.ap-btn:active { transform: scale(.98); }
html body .ap-modal.ruess-formular button.ap-btn:disabled { opacity: .5; cursor: not-allowed; }
html body .ap-modal.ruess-formular button:focus-visible { outline: 2px solid var(--ds-focus) !important; outline-offset: 2px; }
html body .ap-modal.ruess-formular .ap-dialog > header > button.ap-icon-btn { background: transparent !important; color: var(--ds-ink) !important; border: 0 !important; box-shadow: none !important; border-radius: var(--ds-radius-md) !important; min-height: 0 !important; }
html body .ap-modal.ruess-formular .ap-dialog > header > button.ap-icon-btn:hover { background: var(--ds-surface-hover) !important; }
@media (max-width: 640px) {
  .ap-modal.ruess-formular { padding: var(--ds-space-3); }
  .ap-modal.ruess-formular .ap-form { grid-template-columns: 1fr; }
  html body .ap-modal.ruess-formular button.ap-btn { height: 42px !important; min-height: 42px !important; }
}

/* Anprobeliste 3.5.0: Emblem-Text je Traeger, Neuer Traeger */
.anprobe-karte .anprobe-emblem { display: inline-flex; align-items: center; gap: var(--ds-space-1); margin-right: var(--ds-space-2); }
.anprobe-karte .anprobe-emblem input { width: 150px; height: var(--ds-h-sm); padding: 0 var(--ds-space-2); font-size: var(--ds-font-xs); }
.anprobe-karte .anprobe-emblem small { color: var(--ds-muted); font-size: var(--ds-font-xs); }
.anprobe-karte .anprobe-emblem-fest { color: var(--ds-text); font-size: var(--ds-font-xs); font-weight: 600; margin-right: var(--ds-space-2); }
@media (max-width: 640px) { .anprobe-karte .anprobe-emblem input { width: 120px; } }
.anprobe-karte .tikos-teile-feld.anprobe-neu { flex: 0 0 auto; width: auto; min-width: 0; }
.anprobe-karte .tikos-teile-feld.anprobe-neu > button { width: auto; padding-left: var(--ds-space-4); padding-right: var(--ds-space-4); }
/* 3.7.17: Anprobeliste erstellen - breites Fenster: 1. Traeger, 2. Spalten, 3. Vorschau (Tabelle scrollt in sich) */
.ap-modal.ruess-formular.anprobe-liste-modal .ap-dialog { width: min(1100px, 100%); display: flex; flex-direction: column; overflow: hidden; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-body { padding: var(--ds-space-4) var(--ds-space-5); display: flex; flex-direction: column; gap: var(--ds-space-3); flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-body > * { flex: 0 0 auto; }
.ap-modal.ruess-formular.anprobe-liste-modal h4 { margin: 0 0 var(--ds-space-2); font-size: var(--ds-font-md); color: var(--ds-ink); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-raster { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-4); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-teil { border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); padding: var(--ds-space-3); min-width: 0; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-filter { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-2); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-filter label, .ap-modal.ruess-formular.anprobe-liste-modal label.anprobe-liste-leer { display: flex; flex-direction: column; gap: var(--ds-space-1); font-size: var(--ds-font-sm); color: var(--ds-text); }
.ap-modal.ruess-formular.anprobe-liste-modal :is(.anprobe-liste-filter, .anprobe-liste-leer) :is(input, select) { height: var(--ds-h-form); box-sizing: border-box; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-md); padding: 0 var(--ds-space-3); font: inherit; background: var(--ds-surface); color: var(--ds-ink); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-knoepfe { display: flex; justify-content: flex-end; gap: var(--ds-space-2); margin: var(--ds-space-2) 0; }
html body .ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-knoepfe button.ap-btn { width: auto; height: 32px !important; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-traeger { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--ds-space-1); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ds-space-1) var(--ds-space-3); margin-bottom: var(--ds-space-3); }
.ap-modal.ruess-formular.anprobe-liste-modal label.ruess-haken { display: flex; flex-direction: row; align-items: center; gap: var(--ds-space-2); min-height: var(--ds-h-sm); cursor: pointer; font-size: var(--ds-font-sm); color: var(--ds-text); }
.ap-modal.ruess-formular.anprobe-liste-modal label.ruess-haken input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--ds-focus); }
.ap-modal.ruess-formular.anprobe-liste-modal label.ruess-haken small { color: var(--ds-muted); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-vorschau { max-height: 320px; overflow: auto; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-md); padding: var(--ds-space-3); background: var(--ds-surface); font-size: var(--ds-font-xs); }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-vorschau .kopf { display: flex; justify-content: space-between; margin-bottom: var(--ds-space-2); line-height: 1.8; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-tabelle { width: 100%; border-collapse: collapse; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-tabelle :is(th, td) { border: 1px solid var(--ds-line-strong); padding: 2px var(--ds-space-1); height: 24px; text-align: left; vertical-align: middle; }
.ap-modal.ruess-formular.anprobe-liste-modal .anprobe-liste-tabelle th { background: var(--ds-surface-2); }
.ap-modal.ruess-formular.anprobe-liste-modal > .ap-dialog > .ap-actions { display: flex; justify-content: flex-end; gap: var(--ds-space-2); flex: 0 0 auto; padding: var(--ds-space-3) var(--ds-space-5); border-top: 1px solid var(--ds-line); background: var(--ds-surface); }
@media (max-width: 760px) {
  .ap-modal.ruess-formular.anprobe-liste-modal :is(.anprobe-liste-raster, .anprobe-liste-filter, .anprobe-liste-spalten) { grid-template-columns: 1fr; }
}
/* 3.7.19: Freie Anprobeliste (ohne Kunde) - Trefferliste und "Meine Artikel" als Zeilen mit kleinem Knopf rechts */
.ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-2); padding: var(--ds-space-1) 0; border-bottom: 1px solid var(--ds-line); font-size: var(--ds-font-sm); color: var(--ds-text); }
.ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-zeile small { color: var(--ds-muted); }
.ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-knoepfe { display: flex; gap: var(--ds-space-1); flex: 0 0 auto; }
html body .ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-zeile button.ap-btn { width: auto; min-width: 32px; height: 30px !important; padding: 0 var(--ds-space-2); flex: 0 0 auto; }
.ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-alle { align-self: end; }
.ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-optionen { grid-template-columns: 2fr 1fr 1fr; margin-bottom: var(--ds-space-3); }
@media (max-width: 760px) { .ap-modal.ruess-formular.freie-anprobe-modal .freie-anprobe-optionen { grid-template-columns: 1fr; } }
