/* mi_CI_look – Tokens (miSHOTS) */
:root {
  --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --mute: #6e6e73;
  --line: rgba(0,0,0,.09); --edge: rgba(0,0,0,.14); --acc: #0071e3;
  --head: rgba(255,255,255,.76); --fill: rgba(120,120,128,.12); --fill2: rgba(120,120,128,.2);
  --danger: #d70015; --ok-bg: rgba(48,209,88,.13); --ok-line: rgba(48,209,88,.4);
  --r: 22px; --shadow: 0 1px 3px rgba(0,0,0,.05), 0 8px 28px rgba(0,0,0,.06);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --card: #1c1c1e; --ink: #f5f5f7; --mute: #a1a1a6;
    --line: rgba(255,255,255,.12); --edge: rgba(255,255,255,.2); --acc: #2997ff;
    --head: rgba(22,22,23,.72); --danger: #ff453a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; letter-spacing: -.011em; -webkit-font-smoothing: antialiased; }
a { color: var(--acc); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
[hidden] { display: none !important; }
.brand { font-weight: 300; letter-spacing: -.035em; font-size: 24px; color: var(--ink); text-decoration: none; white-space: nowrap; line-height: 1; }
.brand b { font-weight: 800; }
.brand.big { font-size: 34px; }
.nav { position: sticky; top: 0; z-index: 20; background: var(--head); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 60px; }
.nav .btn { margin-left: auto; }
.btn { border: 0; background: var(--acc); color: #fff; height: 36px; padding: 0 18px; border-radius: 980px; font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: var(--fill); color: var(--ink); filter: none; }
.btn.ghost:hover { background: var(--fill2); }
.btn.danger { background: var(--fill); color: var(--danger); filter: none; }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 980px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--mute); height: 32px; padding: 0 16px; border-radius: 980px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }

main { max-width: 860px; margin: 0 auto; padding: 24px; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; margin: 8px 0 20px; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.mute { color: var(--mute); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.sp { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.card.pad { padding: 20px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.list .item:first-child { border-top: 0; }
.item .t { font-weight: 500; }
.item .s { font-size: 13px; color: var(--mute); }
.item .k { font-variant-numeric: tabular-nums; text-align: right; font-weight: 500; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--fill); border: 0; border-radius: 12px; height: 38px; padding: 0 12px; min-width: 0; letter-spacing: inherit; }
textarea { height: auto; padding: 10px 12px; width: 100%; resize: vertical; }
input[type=number] { width: 96px; }
label { display: block; font-size: 12px; color: var(--mute); margin-bottom: 4px; }
.field { display: inline-block; }
.search { width: 100%; height: 42px; border-radius: 980px; padding: 0 18px; }

.bar { height: 10px; border-radius: 980px; background: var(--fill); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--acc); border-radius: 980px; }
.bar.over > i { background: var(--danger); }
.macros { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--mute); }
.macros b { color: var(--ink); font-weight: 600; }
.big-n { font-size: 44px; font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.empty { text-align: center; color: var(--mute); padding: 36px 20px; }

dialog { border: 0; border-radius: var(--r); padding: 24px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grid4 input { width: 100%; }
.ing { display: flex; gap: 8px; margin-bottom: 8px; }
.ing input[list] { flex: 1; }
.ing input[type=number] { width: 84px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.login { max-width: 340px; margin: 18vh auto 0; text-align: center; }
.login input { width: 100%; margin: 20px 0 12px; height: 42px; border-radius: 980px; padding: 0 18px; }
.chk { display: flex; gap: 10px; align-items: center; }
.chk input { width: 18px; height: 18px; accent-color: var(--acc); }
.chk.done span { text-decoration: line-through; color: var(--mute); }

@media (max-width: 640px) {
  main { padding: 14px 12px 40px; }
  .nav { padding: 0 12px; gap: 10px; }
  .nav .brand { display: none; }
  .nav .btn { display: none; }
  .nav .seg { width: 100%; }
  .nav .seg button { flex: 1; padding: 0 4px; }
  .list .item { padding: 12px 14px; }
  .grid4 { grid-template-columns: 1fr 1fr; }
}
@media print {
  .nav, .btn, .seg { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Produkte: Fotos, Auslesen */
.thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; background: var(--fill); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pbox { aspect-ratio: 4 / 3; border-radius: 16px; background: var(--fill); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 13px; text-align: center; }
.pbox img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptile label { display: inline-flex; margin-bottom: 0; }
input.miss { outline: 2px solid var(--danger); outline-offset: -2px; }
input.got { outline: 2px solid rgba(48,209,88,.7); outline-offset: -2px; }
.ocrmsg { background: var(--fill); border-radius: 14px; padding: 4px 14px; font-size: 13px; }
.ocrmsg p { margin: 8px 0; }
.ocrmsg pre { white-space: pre-wrap; font-size: 12px; margin: 6px 0 10px; }
.okmsg { color: var(--ink); }
.shophead { background: var(--fill); padding-top: 8px !important; padding-bottom: 8px !important; font-size: 13px; }
select.u { max-width: 150px; }
