/* Versand an Bieter (ava-versand.js): Fenster mit Firmen, Unterlagen, Nachricht – hell und dunkel über die Variablen */
.vs-dialog .vs-form { width: min(980px, 96vw); height: min(780px, 92vh); display: flex; flex-direction: column; }
.vs-dialog .vs-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.vs-tabs-zeile { padding: 0 20px 6px; }
.vs-tabs-zeile .abr-tab-count:empty { display: none; }
.vs-tabs-zeile .abr-tab-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; font-size: 11px; line-height: 18px; background: color-mix(in srgb, var(--text) 10%, transparent); }

.vs-hinweise:empty { display: none; }
.vs-hinweise { display: grid; gap: 6px; }
.vs-hinweis { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.vs-hinweis span { flex: 1; }
.vs-hinweis.is-warn { background: color-mix(in srgb, #f59e0b 16%, transparent); }

.vs-werkzeug { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vs-werkzeug .is-aktiv { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.vs-alle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.vs-klein { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.vs-leer { color: var(--muted); font-size: 13px; }
.vs-rot { color: var(--danger) !important; }
.vs-leerfeld { padding: 22px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); line-height: 1.5; text-align: center; }
.dialog .vs-mini, .vs-mini { height: 26px; min-height: 26px; padding: 0 10px; font-size: 12px; border-radius: 8px; }

/* händisch eintippen */
.vs-neu { display: grid; grid-template-columns: 1.4fr 1.4fr 0.6fr 1.2fr 0.9fr auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.vs-neu label, .vs-feld { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.vs-neu input, .vs-neu select, .vs-feld input, .vs-feld textarea, .vs-adr-suche input, .vs-adr-suche select { width: 100%; box-sizing: border-box; }
.vs-neu .vs-klein { grid-column: 1 / -1; }
.vs-feld textarea { font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; min-height: 220px; }
.vs-feld-kurz { max-width: 260px; }

/* Adressbuch */
.vs-adressbuch { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.vs-adr-suche { display: grid; grid-template-columns: 1fr 220px; gap: 8px; }
.vs-adr-liste { max-height: 260px; overflow: auto; display: grid; gap: 2px; }
.vs-adr { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.vs-adr:hover { background: var(--row-hover-bg); }
.vs-adr b { display: block; }
.vs-adr small, .vs-adr-mail { color: var(--muted); font-size: 12px; }
.vs-adr.is-aus { opacity: 0.55; cursor: default; }
.vs-adr-fuss { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }

/* Firmenliste */
.vs-firmen { display: grid; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.vs-firma { display: grid; grid-template-columns: 30px minmax(170px, 1.6fr) 1fr 1.1fr 0.9fr 34px; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--border); font-size: 13px; }
.vs-firma:first-child { border-top: 0; }
.vs-firma.vs-kopf { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding-top: 6px; padding-bottom: 6px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.vs-firma.is-gesperrt { opacity: 0.6; }
.vs-firma-name { min-width: 0; }
.vs-firma-name b { display: block; overflow-wrap: anywhere; }
.vs-firma small, .vs-zelle small { display: block; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.vs-zelle { min-width: 0; display: grid; gap: 2px; justify-items: start; }
.vs-hand { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 10.5px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.vs-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--muted); white-space: nowrap; }
.vs-chip.is-ok { background: color-mix(in srgb, #16a34a 18%, transparent); color: #16a34a; }
.vs-chip.is-teil { background: color-mix(in srgb, #f59e0b 20%, transparent); color: #b45309; }
.vs-chip.is-fehler { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.vs-chip.is-aus { text-decoration: line-through; }
.dialog .vs-menue-knopf, .vs-menue-knopf { width: 30px; height: 30px; min-height: 30px; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.vs-menue-knopf svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.vs-verlauf { grid-column: 2 / -1; padding: 6px 0 2px; }
.vs-verlauf-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.vs-verlauf-tab td { padding: 4px 6px; border-top: 1px solid var(--border); vertical-align: top; }
.vs-verlauf-tab td:first-child { white-space: nowrap; color: var(--muted); width: 1%; }
.vs-verlauf-tab td:last-child { color: var(--muted); width: 28%; }
.vs-verlauf code { font-size: 11px; overflow-wrap: anywhere; }

/* Unterlagen */
.vs-block { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.vs-block-kopf { display: flex; align-items: center; gap: 8px; }
.vs-datei { display: grid; grid-template-columns: 28px 1fr auto 32px 32px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.vs-datei.is-weg { opacity: 0.6; }
.vs-datei-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.vs-datei-ico.is-lv svg { stroke: var(--accent); }
.vs-datei-name { min-width: 0; }
.vs-datei-name b { display: block; overflow-wrap: anywhere; }
.vs-datei-name small { display: block; color: var(--muted); font-size: 11.5px; }
.vs-hash { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px !important; }
.vs-datei-zahl { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vs-ico-knopf { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--text); text-decoration: none; }
.vs-ico-knopf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.vs-ico-knopf:hover { background: var(--row-hover-bg); }
.dialog .vs-weg { font-size: 18px; padding: 0; min-height: 30px; }
.vs-ablage { display: grid; gap: 2px; justify-items: center; padding: 18px; border: 1.5px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 13px; cursor: pointer; text-align: center; }
.vs-ablage u { color: var(--accent); }
.vs-ablage small { font-size: 11.5px; }
.vs-ablage.is-ueber { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.vs-hochladen { display: grid; grid-template-columns: 1fr 180px; gap: 10px; align-items: center; font-size: 12px; }
.vs-balken { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.vs-balken i { display: block; height: 100%; background: var(--accent); }
.vs-zurueck summary { cursor: pointer; font-size: 13px; color: var(--muted); }

/* Nachricht */
.vs-platzhalter { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.vs-gespeichert { font-size: 12px; color: var(--muted); }

.vs-fuss { flex-wrap: wrap; }
.vs-fuss .primary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; margin-right: 6px; vertical-align: -2px; }
.vs-fortschritt { font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
  .vs-dialog .vs-form { width: 100vw; height: 100dvh; }
  .vs-neu, .vs-adr-suche { grid-template-columns: 1fr; }
  .vs-firma { grid-template-columns: 30px 1fr 34px; }
  .vs-firma.vs-kopf { display: none; }
  .vs-firma .vs-zelle { grid-column: 2 / 3; }
  .vs-firma .vs-zelle::before { content: attr(data-label); font-size: 10.5px; text-transform: uppercase; color: var(--muted); }
  .vs-firma .vs-menue-knopf { grid-row: 1; grid-column: 3; }
  .vs-datei { grid-template-columns: 24px 1fr 32px 32px; }
  .vs-datei-zahl { grid-column: 2; }
}
.vs-dialog button:disabled, .vs-dialog .primary:disabled { opacity: 0.45; cursor: not-allowed; }
.vs-feld + .vs-feld, .vs-feld { margin-top: 4px; }
/* „+ Bieter hinzufügen“: eingeladene Firmen zum Übernehmen */
.vs-bieter-vorschlag { grid-column: 1 / -1; }
.vs-bieter-vorschlag .vs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vs-bieter-vorschlag .vs-chips .is-aktiv { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
/* Versand gesperrt (Angebote erfasst bzw. beauftragt): Knopf bzw. Menüeintrag leicht grau, nicht anwählbar */
.vs-gesperrt, button.vs-gesperrt:disabled, .ava-tb-btn.vs-gesperrt:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.4); }
/* Nachweis Versand an Bieter: Übersicht als Fly-over, Vorschau/PDF erst per Klick */
.vs-nw-dialog .vs-nw-form { width: min(940px, 96vw); height: min(760px, 92vh); }
.vs-nw-kacheln { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vs-nw-kachel { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--text) 3%, transparent); }
.vs-nw-kachel b { font-size: 20px; line-height: 1.1; }
.vs-nw-kachel span { font-size: 12px; color: var(--muted); }
.vs-nw-kachel.is-ok b { color: #16a34a; }
.vs-nw-zeile { cursor: pointer; }
.vs-nw-zeile:hover { background: var(--row-hover-bg); }
.vs-nw-zeile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vs-nw-zeile.is-offen { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.vs-nw-pfeil { color: var(--muted); font-size: 12px; text-align: center; }
.vs-nw-zeile .vs-verlauf { cursor: default; }
@media (max-width: 760px) { .vs-nw-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Inhalt nie zusammendrücken – das Fenster scrollt (sonst wurde die Firmenliste bei vielen Unterlagen zur Linie) */
.vs-dialog .vs-body > * { flex-shrink: 0; }
