:root {
  --pico-primary: #0b7d6e;
  --pico-primary-background: #0b7d6e;
  --pico-primary-hover: #096557;
  --pico-primary-hover-background: #096557;
  --pico-form-element-spacing-vertical: .5rem;
  --st-neu: #6c7a89;
  --st-zu_drucken: #d48806;
  --st-in_druck: #1677ff;
  --st-gedruckt: #389e0d;
  --st-verworfen: #8c8c8c;
}

.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
nav .small, button.small, [role=button].small { padding: .25rem .6rem; font-size: .85rem; }
button.linkish { background: none; border: 0; padding: 0; color: inherit; margin: 0; width: auto; }
.flash { background: var(--pico-primary-background); color: #fff; padding: .5rem 1rem; border-radius: var(--pico-border-radius); }
.error { color: #cf1322; }
.notice { border-left: 4px solid #d48806; padding: .6rem 1rem; background: color-mix(in srgb, #d48806 10%, transparent); border-radius: 4px; margin-bottom: 1rem; }
.narrow { max-width: 640px; margin-inline: auto; }
.empty { text-align: center; }
.pre { white-space: pre-wrap; }
.mono { font-family: var(--pico-font-family-monospace); font-size: .75rem; }
.meta { color: var(--pico-muted-color); font-size: .9rem; margin-bottom: .4rem; }

form.inline { display: inline; margin: 0; }
form.inline button, form.inline select { width: auto; margin: 0; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.inline-form > * { width: auto; flex: 1 1 auto; margin: 0; }
.inline-form > button { flex: 0 0 auto; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters > * { flex: 1 1 140px; margin: 0; }
.filters input[type=search] { flex: 3 1 260px; }
.filters button { flex: 0 0 auto; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.card { padding: 0; overflow: hidden; margin: 0; display: flex; flex-direction: column; border-top: 4px solid var(--st, transparent); }
.card .cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--pico-muted-border-color); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: .75rem; display: flex; flex-direction: column; flex: 1; }
.card-body h4 { font-size: 1rem; margin-bottom: .3rem; }
.card-body h4 a { text-decoration: none; }
.quick-status { margin-top: auto; display: flex; gap: .3rem; flex-wrap: wrap; }
.quick-status button { margin: 0; width: auto; }
.noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--pico-muted-color); }
.noimg.big { aspect-ratio: 4 / 3; background: var(--pico-muted-border-color); border-radius: var(--pico-border-radius); }

.status-neu { --st: var(--st-neu); }
.status-zu_drucken { --st: var(--st-zu_drucken); }
.status-in_druck { --st: var(--st-in_druck); }
.status-gedruckt { --st: var(--st-gedruckt); }
.status-verworfen { --st: var(--st-verworfen); opacity: .7; }

.badge { position: absolute; top: .5rem; padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; color: #fff; background: var(--st, #555); }
.badge.status { left: .5rem; }
.badge.qty { right: .5rem; background: #000a; }
.badge.inline { position: static; }
.pill { display: inline-block; padding: 0 .45rem; border-radius: 999px; font-size: .75rem; background: var(--pico-muted-border-color); color: var(--pico-color); }
.pill.warn { background: #d48806; color: #fff; }
.pill.ok { background: var(--st-gedruckt); color: #fff; }
.label { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; margin: 0 .25rem .25rem 0; border-radius: 4px; font-size: .8rem; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.label input { margin: 0; }
.labels { margin: 0 0 .5rem; }
.label-list { list-style: none; padding: 0; }
.label-list li { list-style: none; display: flex; gap: .5rem; align-items: center; }

.item-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .item-head { grid-template-columns: 1fr; } }
.gallery img#main-img { width: 100%; border-radius: var(--pico-border-radius); aspect-ratio: 4 / 3; object-fit: cover; }
.thumbs { display: flex; gap: .4rem; overflow-x: auto; margin-top: .5rem; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; cursor: pointer; flex: 0 0 auto; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.status-row { display: flex; gap: .3rem; flex-wrap: wrap; }
.status-row button { width: auto; margin: 0; }
.st-neu { --pico-primary-background: var(--st-neu); --pico-primary-border: var(--st-neu); }
.status-row button:not(.outline) { background: var(--pico-primary); border-color: var(--pico-primary); }
.label-picker { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.label-picker button { width: auto; margin: 0; }

.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.profile { display: grid; grid-template-columns: 110px 1fr; gap: .75rem; margin: 0; padding: .75rem; }
.profile.chosen { outline: 2px solid var(--pico-primary); }
.profile img { width: 110px; height: 110px; object-fit: cover; border-radius: 4px; }
.profile h5 { margin-bottom: .3rem; font-size: .95rem; }
.materials { font-size: .8rem; margin-bottom: .3rem; }
.swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--c); border: 1px solid #0003; vertical-align: middle; margin-right: .15rem; }

.comments { list-style: none; padding: 0; }
.comments li { list-style: none; padding: .4rem 0; border-bottom: 1px solid var(--pico-muted-border-color); }
.comments li.system { color: var(--pico-muted-color); font-size: .85rem; }

.ingest-preview { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.ingest-preview img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; }
.bookmarklet { cursor: grab; }
