/* Code generiert durch KI - Claude Opus 5.5, am 14.10.2026
   Code überprüft durch NK

   Komponenten und Layout für Carma Lager (Desktop-Web). Grundlage: prototype/Desktop.dc.html.
   Nur semantische Tokens aus tokens.css. Radius 0, keine Schatten, nur Roboto Mono.
   Klassennamen bewusst einfach (z. B. .btn-ghost), ohne __ oder --. */

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: var(--type-text);
  text-transform: uppercase;
}
input, textarea, select { text-transform: none; font-family: inherit; }
button { font-family: inherit; text-transform: uppercase; cursor: pointer; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; flex: none; }
.ic-lg { width: 32px; height: 32px; }
.btn .ic, .chip .ic { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 24px;
  font-size: 14px; line-height: 21px; font-weight: 500; text-decoration: none;
  border: 0.8px solid var(--on-accent); border-radius: 0;
  background: var(--accent); color: var(--on-accent);
  transition: background .5s, color .5s, border-color .5s;
}
.btn:hover, .btn:focus-visible { background: var(--bg); color: var(--link); border-color: var(--link); }
.btn-ghost { background: transparent; color: var(--link); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--link); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover, .btn-danger:focus-visible { background: var(--danger); color: var(--bg); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 12px; }
.btn-xl { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0.8px solid transparent; color: var(--link);
  transition: border-color .3s;
}
.icon-btn:hover { border-color: var(--line); }
.link-btn {
  background: none; border: 0; padding: 0; min-height: 24px;
  color: var(--link); font-size: inherit; line-height: inherit; text-align: left; text-decoration: none;
  display: inline-flex; align-items: center;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.strong { color: var(--text-strong); font-weight: 500; }
.inline-form { display: inline; margin: 0; }

/* ---------- Typografie ---------- */
.h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 500; color: var(--text-strong); }
.h2 { margin: 0; font-size: 16px; line-height: 21px; font-weight: 500; color: var(--text-strong); }
.h3 { margin: 0; font-size: 18px; line-height: 21px; font-weight: 500; color: var(--text-strong); }
.sub { margin: 6px 0 0; color: var(--text-muted); }
.meta { font-size: 12px; line-height: 18px; color: var(--text-muted); }
.strong { color: var(--text-strong); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.plain { margin: 0; }
.wordmark { font-size: 20px; line-height: 24px; font-weight: 500; color: var(--text-strong); }

/* ---------- Layout ---------- */
.shell { position: relative; min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.sidebar {
  flex: 1 0 248px; max-width: 100%;
  display: flex; flex-direction: column; gap: 20px; padding: 20px 0;
  background: var(--bg); border-right: 0.8px solid var(--line-subtle);
}
.brand { padding: 10px 20px 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.brand-logo { display: block; max-width: 180px; height: auto; }
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-spacer { flex: 1; }
.sidebar-foot {
  margin: 0 20px; padding-top: 20px; border-top: 0.8px solid var(--line-subtle);
  display: flex; flex-direction: column; gap: 14px;
}
.who { display: flex; align-items: center; gap: 14px; }
.who-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.avatar {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.content { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 72px; padding: 14px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  border-bottom: 0.8px solid var(--line-subtle);
}
.topbar-title { flex: 1 1 200px; }
.topbar-title span { color: var(--text); }
.main { padding: 40px; display: flex; flex-direction: column; gap: 40px; flex: 1; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.row-end { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.row-tight { display: flex; flex-wrap: wrap; gap: 10px; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-narrow { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-wide { flex: 2 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Navigation ---------- */
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px;
  padding: 0 20px 0 17px; background: transparent; border: 0; border-left: 3px solid transparent;
  color: var(--text); font-size: 14px; line-height: 21px; font-weight: 700; text-align: left; text-decoration: none;
  transition: background .3s;
}
.nav-item:hover { background: var(--surface); }
.nav-item.on { border-left-color: var(--accent); background: var(--surface); color: var(--text-strong); }
.nav-item.warn { font-weight: 400; color: var(--warning); }
.count { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.crumb { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }

/* ---------- Panels und Kennzahlen ---------- */
.panel { background: var(--surface); border-top: 0.8px solid var(--accent); padding: 20px; }
.panel-h {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-bottom: 14px; border-bottom: 0.8px solid var(--line-subtle);
}
.fs { display: flex; flex-direction: column; gap: 20px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 20px; align-items: start; }
.kpi { background: var(--gradient-card); border-top: 0.8px solid var(--accent); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi-l { font-size: 12px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.kpi-l .ic { width: 16px; height: 16px; }
.kpi-l.warn { color: var(--warning); }
.kpi-v { font-size: 54px; line-height: 54px; color: var(--text-strong); margin: 6px 0; }
.kpi-s { font-size: 12px; color: var(--text); }
.li { display: flex; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 0.8px solid var(--line-subtle); }
.li-tight { gap: 14px; }
.empty-note { margin: 14px 0 0; }
.ok-note { display: flex; gap: 10px; align-items: center; margin: 20px 0 0; color: var(--success); }

/* ---------- Status ---------- */
.st {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 18px; padding: 1px 8px;
  border: 0.8px solid currentColor; white-space: nowrap;
}
.st .ic { width: 14px; height: 14px; }
.st-warn { color: var(--warning); }
.st-danger { color: var(--danger); }
.st-ok { color: var(--success); }
.st-muted { color: var(--text-muted); }
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 6px;
  border: 0.8px solid var(--line); font-size: 11px; line-height: 1;
  color: var(--text); text-transform: none; font-weight: 400;
}
.btn .kbd { border-color: currentColor; color: inherit; }
.dir {
  width: 32px; height: 32px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 0.8px solid var(--line); color: var(--link);
}
.dir .ic { width: 16px; height: 16px; }
.dir.in { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.qty-col { min-width: 44px; }
.stock-col { min-width: 96px; text-align: right; }

/* ---------- Formulare ---------- */
.field {
  display: block; width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--bg); color: var(--text-strong);
  border: 0.8px solid var(--line); border-radius: 0;
  font-size: 14px; line-height: 21px;
}
.field::placeholder { color: var(--text-muted); }
.field.err { border-color: var(--danger); }
textarea.field { resize: vertical; min-height: 110px; }
.field-xl { min-height: 68px; font-size: 20px; line-height: 24px; padding-left: 56px; padding-right: 110px; }
.field-search { padding-left: 46px; }
.lbl { display: block; font-size: 12px; line-height: 18px; color: var(--text-muted); margin-bottom: 6px; }
.search-wrap { position: relative; }
.search-wrap.sized { flex: 1 1 320px; max-width: 520px; }
.search-wrap.sized-sm { flex: 1 1 280px; max-width: 420px; }
.search-ic { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--link); pointer-events: none; }
.search-ic-sm { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--link); pointer-events: none; }
.qty-pill {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: var(--accent); color: var(--on-accent);
  font-size: 12px; line-height: 18px; padding: 2px 10px; font-weight: 700;
}
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.dims { display: flex; align-items: center; gap: 10px; }
.dims .field { flex: 1 1 0; min-width: 0; }
.err-t { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--danger); font-size: 12px; }
.err-t .ic { width: 14px; height: 14px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 0.8px solid currentColor; font-size: 14px; }
.alert-danger { color: var(--danger); }
.alert-warn { color: var(--warning); }
.hints { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: var(--text-muted); }
.hints .h { display: inline-flex; align-items: center; gap: 6px; }

/* Chips: Filter und Auswahl. Als Link, Button oder Label mit Radio/Checkbox. */
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 0.8px solid var(--line); background: transparent; color: var(--text);
  font-size: 12px; text-decoration: none; cursor: pointer;
  transition: border-color .3s;
}
.chip:hover { border-color: var(--link); }
.chip.on, .chip:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip-dashed { border-style: dashed; color: var(--link); }
.chip-n { opacity: .8; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fakefield {
  flex: 1 1 360px; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 20px;
  background: var(--bg); border: 0.8px solid var(--line); color: var(--text-muted);
  font-size: 16px; text-align: left; text-decoration: none; transition: border-color .3s;
}
.fakefield:hover { border-color: var(--link); color: var(--text); }
.fakefield-text { flex: 1; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0.8px solid var(--line); }
.seg-b {
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: transparent; border: 0; color: var(--text); font-size: 16px; font-weight: 500;
  transition: background .3s;
}
.seg-b:hover { background: var(--surface); }
.seg-b.on { background: var(--accent); color: var(--on-accent); }
.stepper { display: flex; align-items: stretch; }
.step {
  width: 44px; height: 44px; flex: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0.8px solid var(--line); color: var(--link); font-size: 20px;
}
.step:hover { background: var(--surface-strong); }
.step-in { width: 80px; text-align: center; border-left: 0; border-right: 0; font-size: 18px; }
/* 32 px wie im Prototyp (Entscheidung NK, Abweichung von der 44-px-Regel). */
.step-sm { width: 32px; height: 32px; font-size: 16px; }
.step-in-sm { width: 44px; min-height: 32px; height: 32px; padding: 4px; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.after-value { font-size: 18px; line-height: 44px; color: var(--text-strong); }

/* Suchbegriffe */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border: 0.8px solid var(--line-subtle); font-size: 11px; line-height: 1; color: var(--text);
}
.tag-lg { height: 30px; padding: 0 2px 0 10px; font-size: 12px; border-color: var(--line); color: var(--text-strong); }
.tag-x { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--link); padding: 0; }
.tag-x .ic { width: 14px; height: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tagfield { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; min-height: 52px; background: var(--bg); border: 0.8px solid var(--line); }
.tag-in { flex: 1 1 200px; min-height: 36px; border: 0; background: transparent; color: var(--text-strong); font-size: 14px; padding: 0 6px; }
.tag-in:focus { outline: none; }
.tagfield:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Foto */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 220px; width: 100%; padding: 20px;
  border: 0.8px dashed var(--line); background: var(--bg); color: var(--text);
  font-size: 12px; text-align: center; cursor: pointer; transition: border-color .3s;
}
.drop:hover, .drop.over { border-color: var(--link); }
.drop:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-preview { max-width: 100%; max-height: 160px; display: block; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }

/* ---------- Vorschläge (Buchen) ---------- */
.sugg-box { border: 0.8px solid var(--line); background: var(--surface); }
.sugg {
  display: flex; align-items: center; gap: 20px; width: 100%; min-height: 60px; padding: 8px 20px;
  background: transparent; border: 0; border-bottom: 0.8px solid var(--line-subtle);
  color: var(--text); font-size: 14px; text-align: left; transition: background .3s;
}
.sugg:hover, .sugg.hi { background: var(--surface-strong); }
.sugg-create { color: var(--link); border-bottom: 0; }
.sugg-none { padding: 14px 20px 0; }
.stock-n { min-width: 32px; text-align: right; }
.thumb {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--surface-strong); color: var(--text-strong); font-weight: 700;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-lg { width: 64px; height: 64px; font-size: 22px; }
.sel-card { display: flex; gap: 20px; align-items: center; }
.sel-card.compact { gap: 14px; }
.sel-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 40px; }
.sel-actions.compact { align-items: center; gap: 20px; }
.push-right { margin-left: auto; }
.inset { display: flex; flex-direction: column; gap: 20px; padding: 20px; background: var(--bg); border: 0.8px solid var(--line-subtle); }

/* ---------- Produktdetail ---------- */
.photo-xl {
  width: 220px; height: 220px; flex: none;
  display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  background: var(--surface-strong); color: var(--text-strong); font-size: 12px; overflow: hidden;
}
.photo-xl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-initial { font-size: 54px; line-height: 54px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.facts dt { font-size: 12px; line-height: 18px; color: var(--text-muted); }
.facts dd { margin: 0; color: var(--text-strong); }
.desc { margin: 0; }
.qr-box { background: #FFFFFF; padding: 12px; flex: none; }
.qr-box svg { width: 132px; height: 132px; display: block; }
.stock-big { display: flex; align-items: baseline; gap: 10px; }
.book-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; max-width: 100%; }
.tbl { display: flex; flex-direction: column; }
.tbl-products { min-width: 1040px; }
.tbl-cats { min-width: 720px; }
.tbl-hist { min-width: 960px; }
.tbl-users { min-width: 800px; }
.tr {
  display: grid; grid-template-columns: 44px minmax(260px, 2.4fr) 1fr 1fr 1.4fr 160px 104px;
  gap: 14px; align-items: center; padding: 8px 14px;
  border-bottom: 0.8px solid var(--line-subtle); position: relative;
}
.tr-cat { grid-template-columns: minmax(240px, 2fr) 1fr 1fr 120px; }
.tr-hist { grid-template-columns: 180px minmax(240px, 2fr) 150px 90px 150px 1fr; }
.tr-user { grid-template-columns: minmax(240px, 2fr) 1fr 140px 150px; }
.th { background: var(--surface-strong); color: var(--text-strong); font-size: 12px; font-weight: 500; border-bottom: 0; min-height: 44px; }
.th-right { text-align: right; }
.row { min-height: 64px; transition: background .3s; }
.row:hover { background: var(--surface); }
.rowlink {
  background: none; border: 0; padding: 0; text-align: left; text-decoration: none;
  color: var(--text-strong); font-weight: 500; font-size: 14px; line-height: 21px;
}
.rowlink::after { content: ""; position: absolute; inset: 0; }
.rowlink:hover { text-decoration: underline; }
.rowlink:focus-visible { outline: none; }
.rowlink:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
.rowtext { color: var(--text-strong); font-weight: 500; }
.above { position: relative; z-index: 1; }
.cell-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cell-stack { min-width: 0; display: flex; flex-direction: column; }
.cell-stock { display: flex; align-items: center; gap: 10px; }
.cell-stock .strong { min-width: 28px; }
.cell-actions { display: flex; justify-content: flex-end; gap: 4px; }
.cell-dir { display: flex; align-items: center; gap: 10px; }
.cb-wrap { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.cb { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 10px 20px; background: var(--surface-strong); }
.empty-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

/* ---------- Dialoge, Toast ---------- */
dialog.dialog {
  border: 0; border-top: 3px solid var(--accent); border-radius: 0;
  background: var(--surface); color: var(--text);
  padding: 20px; margin: 96px auto 20px;
  width: min(var(--dialog-w, 520px), calc(100% - 40px)); max-height: calc(100vh - 116px);
  overflow: auto;
}
dialog.dialog[open] { display: flex; flex-direction: column; gap: 20px; }
dialog.dialog.wide { --dialog-w: 720px; }
dialog.dialog::backdrop { background: var(--overlay); }
.dialog-title { display: flex; align-items: center; gap: 10px; }
.toast-zone { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--accent); color: var(--on-accent); font-weight: 500; }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-panel { width: min(440px, 100%); }

/* ---------- Etiketten-Vorschau ---------- */
.sheet-wrap { background: var(--surface); padding: 20px; }

@media (max-width: 769px) {
  .main { padding: 20px; }
  .topbar { padding: 14px 20px; }
  .photo-xl { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Ende KI Code */
