/* einkauf.js + baustelle.js – eigene Regeln */

/* Positionen eines Lieferscheins */
.ek-items { display: flex; flex-direction: column; }
.ek-item { display: grid; gap: 6px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--line);
  grid-template-columns: 30px 120px minmax(0, 1fr) 92px 92px 116px 34px;
  grid-template-areas: "chk art name qty unit ek del"; }
.ek-item.no-ek { grid-template-columns: 30px 120px minmax(0, 1fr) 92px 92px 34px; grid-template-areas: "chk art name qty unit del"; }
.ek-item.head { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 4px 0; }
.ek-item > .a-chk { grid-area: chk; padding-top: 8px; display: flex; justify-content: center; }
.ek-item > .a-art { grid-area: art; }
.ek-item > .a-name { grid-area: name; min-width: 0; }
.ek-item > .a-qty { grid-area: qty; }
.ek-item > .a-unit { grid-area: unit; }
.ek-item > .a-ek { grid-area: ek; }
.ek-item > .a-del { grid-area: del; padding-top: 2px; }
.ek-item input, .ek-item select { font-size: 14px; padding: 6px 8px; min-height: 36px; }
.ek-item .hint { font-size: 12px; color: var(--warn); margin-top: 3px; }
.ek-item.checked .a-name input { color: var(--muted); }
@media (max-width: 700px) {
  .ek-item, .ek-item.no-ek { grid-template-columns: 34px 1fr 1fr 36px; grid-template-areas: "chk name name del" ". qty unit unit" ". art ek ek"; padding: 10px 0; }
  .ek-item.no-ek { grid-template-areas: "chk name name del" ". qty unit unit" ". art art art"; }
  .ek-item.head { display: none; }
  .ek-item input[type=checkbox] { width: 22px; height: 22px; }
}
.ek-sum { display: flex; justify-content: flex-end; gap: 14px; padding-top: 8px; font-size: 14px; }

/* Abgleich je Lieferschein */
.ek-group { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.ek-group.bad { border-left-color: var(--amber); }
.ek-group.err { border-left-color: var(--danger); }
.ek-group .row.between { margin-bottom: 4px; }
.ek-ls-in { max-width: 140px; font-size: 13.5px; padding: 4px 7px; min-height: 30px; }
.ek-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ek-grid2 .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .ek-grid2 { grid-template-columns: 1fr; } }
.ek-upload-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ek-upload-row:last-child { border-bottom: 0; }
.ek-check-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
.ek-check-list .check { padding: 7px 0; border-bottom: 1px solid var(--line); }
.ek-check-list .check:last-child { border-bottom: 0; }
.ek-filter-sel { min-width: 200px; width: auto; }

/* Tagesbericht */
.bs-hours { display: flex; flex-direction: column; gap: 4px; min-width: 70px; }
.bs-hours .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bs-hours b { font-size: 16px; padding: 8px 0; font-variant-numeric: tabular-nums; }
.bs-labor { margin-top: 4px; font-size: 13px; min-height: 32px; padding: 4px 8px; color: var(--muted); }
.time-row .a-del { padding-bottom: 2px; }
.bs-mat { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 36px; gap: 6px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.bs-mat .art { font-size: 12px; color: var(--faint); margin-top: 2px; }
@media (max-width: 700px) {
  .bs-mat { grid-template-columns: 1fr 1fr 40px; }
  .bs-mat > .bs-mat-name { grid-column: 1 / -1; }
}
.bs-total { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; font-size: 15px; }
.bs-total b { font-size: 18px; font-variant-numeric: tabular-nums; }
.bs-sig-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.bs-summary { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; max-height: 34vh; overflow-y: auto; }
.bs-summary ul { margin: 4px 0 0; padding-left: 18px; }
.bs-ro-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.bs-ro-row:last-child { border-bottom: 0; }
.bs-card-list .list-item { padding: 14px 16px; }

/* Texterkennung (Lieferschein-Foto) */
.ek-read { margin-top: 10px; }
.notice.ek-read .spinner { margin-right: 6px; }
