/* Lagerverwaltung – Handy zuerst. Design wie widi-gebaeudeservice.de:
   Hellgrün (--primary, aus den Einstellungen) für Aktionen, Dunkelgrün für Überschriften, Source Sans 3. */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/fonts/source-sans-3.woff2') format('woff2');
}
:root {
  --primary: #95c11f;
  --on-primary: #fff;
  --primary-soft: color-mix(in srgb, var(--primary) 14%, white);
  --brand-dark: #00664f;
  --grey: #676c6e;
  --bg: #f5f8ef;
  --card: #fff;
  --text: #2b3033;
  --muted: #676c6e;
  --border: #e3e7e1;
  --ok: #17803d;
  --ok-soft: #e6f4ea;
  --bad: #c62828;
  --bad-soft: #fdecea;
  --warn: #a15c00;
  --radius: 4px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --btn-shadow: 3px 3px 10px rgba(0, 0, 0, 0.35);
  font-family: 'Source Sans 3', Arial, Helvetica, sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
/* kein Zoom durch schnelles Doppeltippen (PIN, Mengen-Knöpfe) */
html, body, button, a, input, select, textarea, label { touch-action: manipulation; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; font-size: 17px; line-height: 1.4; }
body.noscroll { overflow: hidden; }
a { color: var(--brand-dark); }
h1, h2, h3 { margin: 0 0 0.6em; line-height: 1.2; color: var(--brand-dark); font-weight: 700; }
h2, h3 { text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
small { font-size: 0.82rem; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.ic { flex: none; vertical-align: middle; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); color: var(--grey);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.27);
  min-height: 60px;
}
.top h1 { font-size: 1.2rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.top .brand { display: flex; align-items: center; gap: 10px; color: var(--brand-dark); text-decoration: none; font-weight: 700; min-width: 0; }
.top .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; border-left: 2px solid var(--primary); padding-left: 10px; }
.top .back { color: var(--brand-dark); display: flex; padding: 6px; margin-left: -6px; }
.top .who { font-size: 0.9rem; max-width: 30vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .iconbtn { color: var(--grey); }
.logo { height: 40px; max-width: 150px; object-fit: contain; }
.logo-fallback { display: inline-flex; align-items: center; justify-content: center; width: 40px; color: var(--primary); }

main { max-width: 820px; margin: 0 auto; padding: 14px 12px calc(110px + env(safe-area-inset-bottom)); }

/* ---------- Bausteine ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 0;
  border: 1px solid #cfd6cc; background: #fff; color: var(--brand-dark);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; pointer-events: none; }
.btn.primary {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary);
  text-transform: uppercase; letter-spacing: 0.02em; box-shadow: var(--btn-shadow);
}
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger.ghost { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, white); }
.btn.big { min-height: 56px; font-size: 1.1rem; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.btn.full { width: 100%; margin-bottom: 12px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 0; border-radius: 0; background: transparent; color: var(--text);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.iconbtn:active { background: rgba(0, 0, 0, 0.08); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #cfd6cc; background: #fff; border-radius: 0;
  padding: 6px 12px; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; color: var(--brand-dark);
}
.chip.static { cursor: default; }
.chips, .quick, .packs { display: flex; flex-wrap: wrap; gap: 6px; }
.packs { margin-top: 6px; }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 8px; border-radius: 0; text-transform: uppercase;
  background: #eef0f3; color: var(--muted); white-space: nowrap;
}
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.t-eingang, .badge.t-direkt { background: var(--primary-soft); color: #4f6b0a; }
.badge.t-ausgang { background: #e0efe9; color: var(--brand-dark); }
.badge.t-rueckgabe { background: #fff3e0; color: var(--warn); }
.badge.t-umlagerung { background: #ede7f6; color: #5e35b1; }
.badge.t-korrektur { background: #eceff1; color: #455a64; }

/* Formulare */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 0.85rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid #cfd6cc; border-radius: 2px; background: #fff;
  font: inherit; font-size: 16px; color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-dark); outline-offset: -1px; border-color: var(--brand-dark); }
input[type='checkbox'] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--primary); }
input[type='color'] { width: 60px; padding: 4px; }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-size: 0.95rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 4px 0 12px; }
.err { color: var(--bad); background: var(--bad-soft); padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.notice { background: #fff3e0; color: var(--warn); padding: 10px 12px; border-radius: 10px; text-align: center; }
.color-row { display: flex; gap: 8px; }
.color-row #hex { max-width: 130px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters > input, .filters > select { flex: 1 1 160px; }
.filters .check { margin: 0; }
.filters .field.inline { flex: 1 1 140px; margin: 0; }
.seg { display: flex; border: 2px solid var(--brand-dark); margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: #fff; padding: 11px 6px; font: inherit; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.seg button.on { background: var(--brand-dark); color: #fff; }

/* ---------- Anmeldung ---------- */
.login { max-width: 460px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 16px 30px; }
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand h1 { font-size: 1.5rem; margin: 14px 0 2px; text-transform: uppercase; }
.login-brand p { margin: 0; color: var(--muted); }
.login-logo { height: 96px; max-width: 280px; object-fit: contain; }
.login-brand .logo-fallback { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); color: var(--on-primary); }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border-top: 4px solid var(--primary); }
.login-card h2 { text-align: center; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.user-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--text);
}
.user-tile:active { background: var(--primary-soft); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-dark); color: #fff; font-weight: 700;
}
.avatar.big { width: 64px; height: 64px; font-size: 1.4rem; }
.link-back { border: 0; background: none; color: var(--brand-dark); font: inherit; display: flex; align-items: center; gap: 2px; padding: 0; cursor: pointer; }
.pin-user { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0 14px; font-size: 1.1rem; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 16px; min-height: 18px; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-dark); }
.pin-dots span.on { background: var(--brand-dark); }
.pin-dots.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button {
  height: 64px; border-radius: 0; border: 1px solid var(--border); background: #f7f9f4;
  font: inherit; font-size: 1.6rem; font-weight: 600; cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent;
}
.pinpad button:active { background: var(--primary-soft); }
.pinpad button.ok { background: var(--primary); color: var(--on-primary); border-color: var(--primary); box-shadow: var(--btn-shadow); }

/* ---------- Startseite ---------- */
.hello { font-size: 1.3rem; font-weight: 700; margin: 4px 2px 14px; color: var(--brand-dark); text-transform: uppercase; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; min-height: 118px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none;
}
.tile .ic { color: var(--primary); margin-bottom: 6px; }
.tile strong { font-size: 1.05rem; color: var(--brand-dark); text-transform: uppercase; }
.tile small { color: var(--muted); }
.tile.accent { background: var(--primary); color: var(--on-primary); box-shadow: var(--btn-shadow); }
.tile.accent strong, .tile.accent .ic, .tile.accent small { color: inherit; }
.tiles.smalls { grid-template-columns: repeat(4, 1fr); }
.tile.small { min-height: 0; align-items: center; text-align: center; padding: 12px 4px; font-size: 0.8rem; font-weight: 700; color: var(--brand-dark); }
.tile.small .ic { margin: 0 0 2px; color: var(--brand-dark); }
h3.section { margin: 6px 2px 10px; font-size: 0.95rem; letter-spacing: 0.04em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.kpi small { color: var(--muted); display: block; }
.kpi { border-left: 4px solid var(--primary); }
.kpi strong { font-size: 1.4rem; color: var(--brand-dark); }
.setup ol { margin: 0; padding-left: 22px; }
.setup li { margin: 6px 0; }
.setup li.done, .setup li.done a { color: var(--ok); text-decoration: line-through; }

/* Listen */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.rows li:first-child { border-top: 0; }
.rows li small { display: block; color: var(--muted); }
.rows.compact li { padding: 8px 0; }
.list { padding: 4px 0; }
.list .row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--border);
  background: none; font: inherit; text-align: left; color: var(--text); cursor: pointer;
}
.list .row:first-child { border-top: 0; }
.list .row:active { background: var(--primary-soft); }
.row small, .line small, .pick small { display: block; color: var(--muted); }
.row .right { text-align: right; flex: none; }
.row.inactive, .inactive { opacity: 0.55; }
.cancelled { opacity: 0.6; }
.cancelled strong { text-decoration: line-through; }
.sum { margin: 0 4px 8px; color: var(--muted); font-size: 0.9rem; }
.mrow { padding: 10px 14px; border-top: 1px solid var(--border); }
.mrow:first-child { border-top: 0; }
.mhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mhead small { color: var(--muted); }
.mbody small { display: block; color: var(--muted); }
.mbody small.bad { color: var(--bad); }
.mrow .btn { margin-top: 6px; min-height: 32px; }

.thumb { width: 48px; height: 48px; border-radius: 2px; object-fit: cover; flex: none; background: #f0f2f5; }
.thumb.sm { width: 36px; height: 36px; }
.noimg { display: inline-flex; align-items: center; justify-content: center; color: #b0b7c3; }

/* ---------- Scannen & Erfassen ---------- */
.reader { width: 100%; border-radius: 0; overflow: hidden; background: #000; margin-bottom: 10px; min-height: 200px; }
.reader video { width: 100% !important; display: block; }
.scan-actions { display: flex; gap: 8px; }
.scan-actions #camBtn { flex: 1; }
.manual { display: flex; gap: 8px; margin-top: 10px; }
.manual input { flex: 1; }
.last-scan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 0 2px; font-weight: 600; min-height: 0; }
.last-scan:empty { display: none; }
.last-scan.ok { color: var(--ok); }
.last-scan.bad { color: var(--bad); }
.last-scan > span:not(.thumb) { flex: 1; min-width: 60%; }
.count { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.line { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.line:first-child { border-top: 0; }
.line.short { background: var(--bad-soft); margin: 0 -14px; padding: 10px 14px; }
.line small.bad { color: var(--bad); font-weight: 600; }
.line .qty { display: flex; align-items: center; gap: 2px; }
.line .qty input { width: 64px; min-height: 42px; text-align: center; padding: 6px; font-weight: 700; }
.line .qty .iconbtn { background: #eef2e8; color: var(--brand-dark); }
.line .rm { color: var(--muted); }
@media (max-width: 520px) {
  .line .grow { flex-basis: calc(100% - 60px); }
  .line .qty { margin-left: 58px; }
  .line .rm { margin-left: auto; }
}
.flash { animation: flash 0.6s; }
@keyframes flash { from { background: var(--ok-soft); } to { background: transparent; } }
.bookbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.bookbar .btn { max-width: 796px; margin: 0 auto; display: flex; }

/* ---------- Dialoge ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto;
  border-radius: 0; border-top: 4px solid var(--primary); padding: 18px 16px max(16px, env(safe-area-inset-bottom));
  animation: up 0.18s ease-out;
}
.modal.tall { min-height: 70vh; }
@media (min-width: 700px) {
  .modal-bg { align-items: center; }
  .modal { border-radius: var(--radius); }
  .modal.small { max-width: 420px; }
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.mbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }
.confirm-text { font-size: 1.05rem; line-height: 1.6; }
.success { text-align: center; padding: 10px 0; }
.success .ic { color: var(--ok); background: var(--ok-soft); border-radius: 50%; padding: 10px; }
.success p { font-size: 1.1rem; }
.detail-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.big-img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; flex: none; }
.codes { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-list { margin-top: 10px; }
.pick {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 4px; border: 0; border-top: 1px solid var(--border);
  background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text);
}
.pick .ic { color: var(--brand-dark); }

/* Artikel-Formular */
.photo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.photo-prev {
  width: 96px; height: 96px; border-radius: 12px; background: #f0f2f5; color: #b0b7c3; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.photo-prev img { width: 100%; height: 100%; object-fit: cover; }
.photo-btns { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.code-row { display: grid; grid-template-columns: 1fr 42px 0.8fr auto 64px 42px; gap: 6px; align-items: center; margin-bottom: 8px; }
.code-row input { min-height: 42px; padding: 8px; }
.code-row .eq { color: var(--muted); }
@media (max-width: 480px) {
  .code-row { grid-template-columns: 1fr 42px 42px; }
  .code-row [data-k='unit'] { grid-column: 1; }
  .code-row .eq { display: none; }
  .code-row [data-k='factor'] { grid-column: 2 / span 2; }
  .code-row [data-rm] { grid-row: 1; grid-column: 3; }
  .code-row { padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
}
.logo-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-prev { min-width: 120px; height: 60px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 6px; }
.logo-prev img { max-height: 48px; max-width: 200px; }
.exports { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 480px) { .exports { grid-template-columns: 1fr; } .two { grid-template-columns: 1fr; gap: 0; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.tbl th { color: var(--brand-dark); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }

/* Hinweise */
#toasts { position: fixed; left: 0; right: 0; top: max(70px, calc(env(safe-area-inset-top) + 60px)); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: #2b3033; color: #fff; padding: 10px 16px; border-radius: 0; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); max-width: 90vw; transition: opacity 0.4s; }
.toast.ok { background: var(--brand-dark); }
.toast.bad { background: var(--bad); }
.toast.hide { opacity: 0; }

/* ---------- v1.1: Übersicht (PC), Belege, Import, Sicherung ---------- */
.pinpad button, .line .qty, .iconbtn, .tile { -webkit-user-select: none; user-select: none; }
main.wide { max-width: 1500px; }
.desktop-hint { display: none; }
@media (min-width: 900px) {
  .desktop-hint { display: flex; }
  main:not(.wide) .tiles { grid-template-columns: repeat(3, 1fr); }
  main:not(.wide) .tiles.smalls { grid-template-columns: repeat(5, 1fr); }
}
.wcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.wcard { background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px; border-top: 4px solid var(--brand-dark); }
.wcard:first-child { border-top-color: var(--primary); }
.wcard h3 { margin-bottom: 2px; }
.wkv { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--border); font-size: 0.95rem; }
.wcard small.muted + .wkv, .wcard h3 + .wkv { margin-top: 8px; }
.wkv.surplus strong { color: #4f6b0a; }
.wkv.short strong { color: var(--warn); }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.matrix { min-width: 760px; }
.matrix td small { display: block; color: var(--muted); }
.matrix td.num small { font-weight: 700; }
.matrix th { position: sticky; top: 0; background: #fff; }
.matrix tbody tr:hover { background: var(--primary-soft); }
.plus { color: #4f6b0a !important; }
.minus { color: var(--warn) !important; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
@media (max-width: 480px) { .btnrow { grid-template-columns: 1fr; } }
.mactions { display: flex; flex-wrap: wrap; gap: 8px; }
.warnbox { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--bad); border-left: 4px solid var(--bad); }
.warnbox small { display: block; color: var(--muted); }
.kpi.bad { border-left-color: var(--bad); }
.kpi.bad strong { color: var(--bad); }
.version { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 18px; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); margin: 10px 0; }
.success .btn.full { margin-bottom: 8px; }

/* ---------- v1.2: Freigaben & Produkt-Wiki ---------- */
.checks .checks-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.checks .checks-tools input { flex: 1 1 160px; min-height: 38px; padding: 6px 10px; }
.checklist { max-height: 260px; overflow: auto; border: 1px solid var(--border); padding: 4px 10px; background: #fff; }
.checklist .check { margin: 4px 0; font-size: 0.95rem; }
.checks .count { text-transform: none; font-weight: 600; color: var(--muted); }
.urow { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-right: 12px; }
.urow:first-child { border-top: 0; }
.urow .row { border-top: 0 !important; flex: 1; }
.urow .btn { flex: none; }
.list a.row { text-decoration: none; }
.list .row .badge { margin-left: 4px; }
.wiki-sec { margin-top: 14px; }
.wiki-sec h3 { font-size: 0.95rem; margin-bottom: 4px; }
.wiki-sec p { margin: 0; line-height: 1.5; }
.wiki-note { display: flex; gap: 10px; align-items: center; background: var(--primary-soft); border-left: 4px solid var(--primary); padding: 10px 12px; margin-bottom: 12px; font-weight: 600; }
.wiki .detail-head h2 { margin-bottom: 4px; }

/* ---------- v1.3: Inventur & Kontrolle ---------- */
.chip.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
#ifilter { margin-bottom: 8px; }
.line.inv .qty input::placeholder { color: #b0b7c3; font-weight: 400; }
.line small.ok { color: #4f6b0a; font-weight: 700; }
.line small.plus, .line small.minus { font-weight: 700; }
.bookbar-row { display: flex; gap: 8px; max-width: 796px; margin: 0 auto; }
.bookbar-row .btn.primary { flex: 1; }
.warnbox.soft { color: var(--warn); border-left-color: var(--warn); }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.ccard { background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); padding: 14px; border-top: 4px solid #4f6b0a; }
.ccard.lvl-warn { border-top-color: var(--warn); }
.ccard.lvl-bad { border-top-color: var(--bad); }
.chead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chead h3 { margin: 0; }
.status { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 3px 8px; background: var(--primary-soft); color: #4f6b0a; white-space: nowrap; }
.status.lvl-warn { background: #fff3e0; color: var(--warn); }
.status.lvl-bad { background: var(--bad-soft); color: var(--bad); }
.cmsgs { margin: 10px 0 6px; padding: 0; list-style: none; }
.cmsgs li { padding: 5px 8px; margin-bottom: 4px; font-size: 0.9rem; font-weight: 600; background: #fff3e0; color: var(--warn); }
.cmsgs li.lvl-bad { background: var(--bad-soft); color: var(--bad); }
.ccard .wkv { align-items: baseline; }
.ccard .wkv > span:last-child { text-align: right; }
.ccard .wkv small { display: inline; }
.rows li small { display: block; }
.bookbar-row .btn { margin: 0; }
