





.mat-thumb-wrap { position: relative; display: inline-block; line-height: 0; }
.mat-thumb {
width: 40px; height: 40px; object-fit: cover;
border-radius: 4px; border: 1px solid var(--border);
background: var(--surface-2);
}
.mat-foto-mehr {
position: absolute; right: -4px; bottom: -4px;
background: var(--surface-2); color: var(--muted);
border: 1px solid var(--border); border-radius: 8px;
font-size: 10px; line-height: 1; padding: 2px 4px;
}
.mat-kein-foto { color: var(--muted); }
.mat-leer { color: var(--muted); }

.mat-menge { display: inline-flex; align-items: center; gap: 4px; }
.mat-menge-wert { min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.mat-mengen-btn {
width: 26px; height: 26px; padding: 0; line-height: 1;
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-2); color: var(--text);
cursor: pointer; font-size: 15px;
}
.mat-mengen-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mat-mengen-btn:disabled { background: var(--gh-disabled-bg); color: var(--gh-disabled-fg); border-color: var(--gh-disabled-border); cursor: not-allowed; }

.mat-badge-knapp {
display: inline-block; margin-left: 6px; padding: 1px 6px;
border-radius: 9px; font-size: 11px;
background: color-mix(in srgb, var(--warn) 20%, transparent);
color: var(--warn); border: 1px solid var(--warn);
}
.mat-lief-mehr { color: var(--muted); font-size: 12px; }
.mat-preis { color: var(--muted); font-size: 12px; white-space: nowrap; }



.mat-hinweis { color: var(--muted); margin: 4px 0; }

.mat-lief-zeile {
display: grid; align-items: center; gap: 6px;
grid-template-columns: auto minmax(7em, 1fr) minmax(6em, 1fr) 7em 9.5em auto auto;
padding: 5px 0; border-bottom: 1px solid var(--border);
}
.mat-lief-name { font-weight: 600; }
.mat-lief-name em { font-weight: 400; color: var(--muted); }
.mat-lief-feld {
min-width: 0; padding: 5px 6px;
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-0); color: var(--text);
}
.mat-lief-preis { text-align: right; font-variant-numeric: tabular-nums; }



.mat-lief-stern { display: inline-flex; align-items: center; cursor: pointer; }
.mat-lief-stern input { position: absolute; opacity: 0; width: 0; height: 0; }
.mat-lief-stern span { font-size: 18px; color: var(--border); line-height: 1; padding: 2px; }
.mat-lief-stern input:checked + span { color: var(--gold); }
.mat-lief-stern input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.mat-lief-ok, .mat-lief-weg {
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-2); color: var(--text);
padding: 5px 8px; cursor: pointer;
}
.mat-lief-ok:hover, .mat-lief-weg:hover { border-color: var(--accent); }
.mat-lief-weg:hover { border-color: var(--error); color: var(--error); }
.mat-lief-neu { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.mat-lief-neu select {
padding: 6px; border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-0); color: var(--text); min-width: 12em;
}
.mat-direktlinks { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }



.mat-foto-galerie {
display: grid; gap: 10px;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.mat-foto { margin: 0; }
.mat-foto img {
width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
border-radius: 6px; border: 1px solid var(--border);
background: var(--surface-2);
}
.mat-foto figcaption { display: flex; gap: 4px; margin-top: 4px; }
.mat-foto figcaption input {
flex: 1; min-width: 0; padding: 4px 6px; font-size: 12px;
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-0); color: var(--text);
}
.mat-foto-weg {
border: 1px solid var(--border); border-radius: 4px;
background: var(--surface-2); color: var(--muted);
padding: 0 8px; cursor: pointer;
}
.mat-foto-weg:hover { border-color: var(--error); color: var(--error); }
.mat-foto-neu { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.mat-foto-neu label { cursor: pointer; }





.mat-sprung {
background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
color: var(--gh-accent, #58a6ff); text-align: left;
text-decoration: underline; text-underline-offset: 2px;
text-decoration-color: rgba(88, 166, 255, .35);
}
.mat-sprung:hover { text-decoration-color: currentColor; }
.mat-sprung:focus-visible { outline: 2px solid var(--gh-accent, #58a6ff); outline-offset: 2px; }



.mat-lt-kopf {
display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
margin-bottom: 8px; color: var(--muted); font-size: 12px;
}
.mat-lt-kopf > span:first-child { font-weight: 600; }
.mat-lt-zeile {
display: grid; align-items: center; gap: 8px;
grid-template-columns: 44px minmax(0, 1fr) auto auto auto;
padding: 6px 0; border-bottom: 1px solid var(--border);
}
.mat-lt-zeile.inaktiv { opacity: .55; }
.mat-lt-bild { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.mat-lt-bild .mat-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.mat-lt-haupt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.mat-lt-haupt small { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.mat-lt-stern { color: #d9a300; width: 12px; display: inline-block; }
.mat-lt-nummer { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.mat-lt-preis { font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 720px) {
.mat-lt-zeile { grid-template-columns: 36px minmax(0, 1fr) auto; }
.mat-lt-bild, .mat-lt-bild .mat-thumb { width: 36px; height: 36px; }
.mat-lt-nummer { grid-column: 2; }
}



#sd-material-tools { display: flex; align-items: center; gap: 6px; }





.sd-edit-dialog-material .field[data-name="notiz"] textarea {
min-height: 150px;
resize: vertical;
line-height: 1.45;
}



@media (max-width: 720px) {
.mat-lief-zeile {
grid-template-columns: auto 1fr auto auto;
grid-template-areas:
"stern name ok weg"
"nummer nummer preis datum";
gap: 6px 8px;
}
.mat-lief-stern { grid-area: stern; }
.mat-lief-name { grid-area: name; }
.mat-lief-zeile [data-feld="bestellnummer"] { grid-area: nummer; }
.mat-lief-zeile [data-feld="einkaufspreis_netto"] { grid-area: preis; }
.mat-lief-zeile [data-feld="preis_stand"] { grid-area: datum; }
.mat-lief-ok { grid-area: ok; }
.mat-lief-weg { grid-area: weg; }
}
