/* TIMO-Lager — Design im Homebox-Look: helles Kartenlayout, dezente Schatten,
   abgerundete Ecken, viel Weißraum. Richert-Salbeigrün bleibt die Markenfarbe.
   Hell ist Standard, Dunkel ist Opt-in über [data-theme=dunkel] (Umschalter). */

/* ── Design-Tokens ───────────────────────────────────────── */
:root {
  /* Farbwerte 1:1 aus TIMO (Stempeluhr) uebernommen — beide Produkte sollen
     wie eine Familie wirken. Quelle: Stempeluhr-Richert/public/css/admin.css
     (Hell-Theme) + config.js (ACCENT_COLOR). Layout/Struktur unveraendert. */
  --bg: #F4F4F1;
  --surface: #FFFFFF;
  --surface-2: #F0F0EC;
  --border: #E5E4DE;
  --border-strong: #D4D3CB;
  --txt: #1C1C1E;
  --sub: #63636B;
  --muted: #9A9AA0;

  --brand: #4E764E;
  --brand-hover: #3E623E;
  --brand-light: #E9F1E7;
  --brand-contrast: #FFFFFF;

  --ok: #1E9E4A;
  --ok-bg: #DCF5E4;
  --err: #D93A2F;
  --err-bg: #FBE0DE;
  /* Amber (v12, Mindestbestand): dezente Warnung, KEIN Rot-Alarm -- 1:1 aus
     TIMO (Stempeluhr) uebernommen, siehe admin.css/terminal.css. */
  --amber: #B7791F;
  --amber-bg: #FBEFD6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(20, 30, 20, .06);
  --shadow-md: 0 6px 18px -6px rgba(20, 30, 20, .14), 0 2px 6px -2px rgba(20, 30, 20, .06);
  --shadow-lg: 0 20px 44px -14px rgba(20, 30, 20, .22);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme=dunkel] {
  /* Dunkel-Theme aus TIMO (Stempeluhr, dort das Standard-Theme) uebernommen. */
  --bg: #0F0F11;
  --surface: #181820;
  --surface-2: #222230;
  --border: #2E2E3A;
  --border-strong: #3A3A48;
  --txt: #EAEAE4;
  --sub: #8888A0;
  --muted: #4A4A5C;

  --brand: #7FA07F;
  --brand-hover: #93B393;
  --brand-light: rgba(127, 160, 127, .16);
  --brand-contrast: #10130F;

  --ok: #30D158;
  --ok-bg: #0C2018;
  --err: #FF453A;
  --err-bg: #200806;
  --amber: #FFB340;
  --amber-bg: #221506;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 18px -6px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 44px -14px rgba(0, 0, 0, .55);
}

/* ── Basis ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
h2, h3 { margin-top: 28px; margin-bottom: 12px; }
h2:first-child, h3:first-child { margin-top: 0; }
.hinweis { color: var(--sub); font-size: 14px; margin: 0; line-height: 1.5; }
.icon { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; }

.brand-badge { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.brand-badge svg { width: 100%; height: 100%; display: block; }
.brand-badge.klein { width: 32px; height: 32px; border-radius: 9px; }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--sub);
  border-radius: var(--radius-sm);
  width: 38px; height: 34px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }

/* ── Terminal-Kopf (eigenständige, „Topbar“-artige Seiten) ─── */
.kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.kopf h1 { font-size: 19px; margin: 0; flex: 1; }

.mitte {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 18px;
  text-align: center;
}
.mitte h2 { margin: 0 0 4px; }

.fuss {
  padding: 14px 20px;
  text-align: center;
  font-size: 13px;
}
.fuss a { color: var(--sub); text-decoration: none; }
.fuss a:hover { color: var(--brand); }

/* ── Terminal: Mitarbeiter-Kacheln ───────────────────────── */
.ma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 720px;
}
.ma-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 14px;
  text-decoration: none;
  color: var(--txt);
  font-weight: 600;
  font-size: 17px;
  min-height: 120px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ma-kachel:hover, .ma-kachel:focus-visible { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ma-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}

.ma-tag { font-size: 14px; color: var(--sub); }
.ma-tag a { color: var(--brand); text-decoration: none; font-weight: 600; }
.ma-tag a:hover { text-decoration: underline; }

/* Bereits gewaehlter Mitarbeiter (Scan-Bereich): kompakte Leiste mit
   Avatar + Name + "wechseln", ersetzt das Kachel-Grid nach der Auswahl. */
.scan-ma-gewaehlt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px 10px 10px;
}
.ma-avatar-klein {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  flex-shrink: 0;
}
.scan-ma-gewaehlt-name { flex: 1; text-align: left; font-weight: 700; font-size: 15px; }
.scan-ma-gewaehlt .btn { margin-top: 0; }

.scan-form { width: 100%; max-width: 440px; }
#scanInput {
  width: 100%;
  font-size: 21px;
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--brand);
  background: var(--surface);
  color: var(--txt);
  text-align: center;
  box-shadow: var(--shadow-md);
}
#scanInput:focus { outline: 3px solid var(--brand-light); }

/* ── Karten (Terminal-Bestätigung, generisch) ───────────────── */
.karte {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}
.karte-ok { border-color: var(--ok); }
.karte-fehler { border-color: var(--err); }
.karte h2 { margin-top: 0; }
.karte code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13px;
}

.inhalt-liste { text-align: left; margin: 12px 0; padding-left: 20px; color: var(--sub); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  text-decoration: none;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color .12s ease, background .12s ease, transform .05s ease;
}
.btn:hover { border-color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); font-weight: 700; width: 100%; font-size: 17px; padding: 16px 22px; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-sekundaer { background: transparent; width: 100%; }
.btn-klein { padding: 7px 14px; font-size: 13px; margin-top: 0; }
.btn-danger { border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err-bg); }

form { width: 100%; }

/* ── Admin: App-Shell mit Sidebar ────────────────────────── */
.app-shell { flex: 1; display: flex; min-height: 100vh; align-items: stretch; }
.app-sidebar {
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  gap: 6px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.sidebar-title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.sidebar-sub { font-size: 12px; color: var(--sub); font-weight: 400; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sub);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.sidebar-nav a:hover { background: var(--surface-2); color: var(--txt); }
.sidebar-nav a.aktiv { background: var(--brand-light); color: var(--brand); font-weight: 700; }
html[data-theme=dunkel] .sidebar-nav a.aktiv { color: var(--txt); }

.sidebar-foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.sidebar-foot .btn { margin-top: 0; }
.sidebar-abmelden { display: flex; align-items: center; gap: 10px; color: var(--sub); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 14px; flex: 1; }
.sidebar-abmelden:hover { background: var(--surface-2); color: var(--err); }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.app-topbar h1 { font-size: 21px; margin: 0; }
.app-content { padding: 24px 28px 48px; max-width: 1160px; width: 100%; }

/* ── Suchleiste (Homebox-Stil: prominentes Pill-Suchfeld in der Topbar,
   Live-Suche beim Tippen) ─────────────────────────────────────────── */
.topbar-aktionen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-suche {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  padding: 11px 18px;
  min-width: 320px;
  flex: 1;
  max-width: 460px;
  box-shadow: var(--shadow-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.topbar-suche:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.topbar-suche .icon { width: 19px; height: 19px; color: var(--sub); flex-shrink: 0; }
.topbar-suche input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  color: var(--txt);
  width: 100%;
  min-width: 0;
  font-family: inherit;
}
.topbar-suche input::placeholder { color: var(--muted); }
.topbar-suche-leeren {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: none;
  background: var(--surface-2);
  color: var(--sub);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.topbar-suche-leeren .icon { width: 13px; height: 13px; color: inherit; }
.topbar-suche-leeren:hover { background: var(--err-bg); color: var(--err); }
.suche-aktiv { margin-bottom: 16px; min-height: 1.4em; }
.suche-aktiv a { color: var(--brand); font-weight: 600; text-decoration: none; }
.suche-aktiv a:hover { text-decoration: underline; }

/* Kleine Hilfsklasse: Element per JS ein-/ausblenden (Live-Suche, Kacheln). */
.verstecken { display: none !important; }

/* Mobile: Sidebar wird zur schmalen Topbar-Leiste ohne Text-Umbruch-Chaos. */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; min-height: 0; }
  .app-sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-brand { padding: 4px 10px 4px 2px; }
  .sidebar-sub { display: none; }
  .sidebar-nav { flex-direction: row; flex: 1; }
  .sidebar-nav a span.nav-label { display: none; }
  .sidebar-nav a { padding: 10px; }
  .sidebar-foot { border-top: none; margin-top: 0; padding-top: 0; }
  .app-content { padding: 18px 16px 40px; }
  .app-topbar { padding: 14px 16px; }
  .topbar-suche { min-width: 0; flex: 1; }
}

/* ── Tabellen (Historie, Mitarbeiter) ─────────────────────── */
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; }
.table-card table { margin-bottom: 0; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--sub); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

/* ── Rechte-Checkboxen Mitarbeiter (v7) ────────────────────── */
.rechte-form { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--txt); cursor: pointer; white-space: nowrap; }
.checkbox-inline input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-drin { background: var(--ok-bg); color: var(--ok); }
.status-draussen { background: var(--err-bg); color: var(--err); }
.status-neutral { background: var(--surface-2); color: var(--muted); }
/* v12 (Mindestbestand): dezente Markierung "Bestand niedrig" -- bewusst Amber
   statt Rot, kein Alarm-Look (Hallmark: Farbe nie als einziges Signal, siehe
   Text im Badge selbst). */
.status-warn { background: var(--amber-bg); color: var(--amber); }

/* ── Karten-Grid (Kisten & Artikel — Homebox-Item-Look) ──── */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--txt);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .12s ease, border-color .12s ease, transform .12s ease;
}
.item-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
/* Belegte Kisten heben sich ab (gruener Rahmen + kraeftiger linker Balken),
   leere Kisten treten dezent zurueck (gestrichelt, gedaempft). */
.item-card.kiste-belegt { border-color: var(--brand); border-left: 5px solid var(--brand); }
.item-card.kiste-leer { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.item-card.kiste-leer .item-card-media { opacity: .6; }
.item-card.kiste-leer .item-card-title { color: var(--muted); font-weight: 600; }
.item-card-media {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  overflow: hidden;
}
.item-card-media img { width: 100%; height: 100%; object-fit: cover; }
.item-card-media .icon { width: 34px; height: 34px; }
.item-card-badge { position: absolute; top: 10px; right: 10px; box-shadow: var(--shadow-sm); }
.item-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.item-card-kicker { font-size: 11px; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.item-card-title { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-sub { font-size: 13px; color: var(--sub); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-meta { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.leerhinweis { color: var(--sub); font-size: 14px; padding: 32px; text-align: center; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); margin-bottom: 24px; }

/* ── Regal-Tabs (Bestand regalweise, v6) ─────────────────── */
.regal-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.regal-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--sub);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.regal-tab:hover { border-color: var(--brand); color: var(--brand); }
.regal-tab.aktiv { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

/* ── Sektions-Karten (Kiste-Detail, Formulare) ─────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.card-schmal { max-width: 480px; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 26px; box-shadow: var(--shadow-sm); margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hero-titel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-titel h2 { margin: 0; }
.hero-meta { color: var(--sub); font-size: 13px; margin-top: 4px; }
.hero-meta a { color: var(--brand); text-decoration: none; font-weight: 600; }
.hero-meta a:hover { text-decoration: underline; }

/* ── Formulare ───────────────────────────────────────────── */
.formfeld { display: block; margin-bottom: 14px; }
.formfeld label { display: block; font-size: 13px; color: var(--sub); font-weight: 600; margin-bottom: 5px; }
.formfeld input, .formfeld select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--txt);
  font-size: 15px;
  font-family: inherit;
}
.formfeld input:focus, .formfeld select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.zeile-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.zeile-inline .formfeld { flex: 1; min-width: 140px; }

.fehler { color: var(--err); background: var(--err-bg); border: 1px solid var(--err); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }

.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-shell { max-width: 360px; width: 100%; padding: 32px 28px; text-align: center; }
.login-shell .brand-badge { margin: 0 auto 14px; width: 52px; height: 52px; border-radius: 14px; }
.login-shell h1 { font-size: 19px; margin: 0 0 22px; }
.login-shell form { text-align: left; }

/* ── Artikelbilder & Content-Chips ───────────────────────── */
.artikel-bild { object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); display: block; }
.inhalt-chips { display: flex; flex-direction: column; gap: 6px; }
.inhalt-chip { display: flex; align-items: center; gap: 8px; }
.inhalt-liste-artikel { text-align: left; margin: 12px 0; padding: 0; list-style: none; }
.inhalt-liste-artikel li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--sub); }
.inhalt-liste-artikel .artikel-bild { flex-shrink: 0; }

/* ── Scan-Bereich (v4: oben in der einen Oberfläche) ─────── */
.scan-bereich {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.scan-bereich-kopf { display: flex; justify-content: center; width: 100%; }
.scan-bereich-kopf .formfeld { max-width: 280px; width: 100%; margin-bottom: 0; }
.scan-bereich .scan-form { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.content-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 0 8px;
  text-align: center;
}

/* ── Terminal: Lagernummer + Artikel-Karte (v3) ─────────── */
.lagernummer-gross { font-size: 36px; letter-spacing: .5px; margin-bottom: 2px; }
.artikel-karte { display: flex; align-items: center; gap: 14px; text-align: left; margin: 16px 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.artikel-karte .artikel-bild { flex-shrink: 0; }
.artikel-karte-text { flex: 1; }

/* ── Artikel-Auswahl: Such-Kachel-Picker (v8, statt Dropdown) ──────── */
.artikel-picker { margin-bottom: 4px; }
.artikel-picker-suche { margin-bottom: 12px; max-width: 100%; }
/* v9: "+ Neu anlegen" im Scan-Einlager-Kontext -- eigene Zeile über dem Grid,
   damit er auch bei leerer Suche sofort auffaellt. */
.artikel-picker-neu { display: inline-flex; margin-bottom: 12px; }
.artikel-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
}
.artikel-kachel {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--txt);
  transition: border-color .12s ease, background .12s ease;
}
.artikel-kachel:hover { border-color: var(--brand); }
.artikel-kachel.ausgewaehlt { border-color: var(--brand); background: var(--brand-light); }
.artikel-kachel-media { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.artikel-kachel-media img { width: 100%; height: 100%; object-fit: cover; }
.artikel-kachel-media .icon { width: 20px; height: 20px; }
.artikel-kachel-text { min-width: 0; }
.artikel-kachel-nummer { display: block; font-size: 15px; color: var(--txt); font-weight: 700; letter-spacing: .02em; }
.artikel-kachel-name { display: block; font-size: 12px; color: var(--sub); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artikel-kachel-zn { display: block; font-size: 11px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artikel-kachel-leeren { justify-content: center; text-align: center; border-style: dashed; color: var(--sub); font-size: 13px; }

/* ── Artikel-Historie: Produktionsdatum-Hinweis (v8) ───────────────── */
.produktion-hinweis { display: block; font-size: 11px; margin-top: 2px; }

/* ── Scan-Bestaetigen: Mengen-Buchung (v5) ────────────────── */
.scan-buchen-form { width: 100%; }
.scan-buchen-form .formfeld input[type="number"] { text-align: center; font-size: 22px; font-weight: 700; }
.scan-buchen-aktionen { display: flex; gap: 10px; margin-top: 6px; }
.scan-buchen-aktionen .btn { flex: 1; }
.artikel-name { font-size: 17px; font-weight: 700; }
.artikel-leer { font-style: italic; margin: 16px 0; }

/* ── Foto vom VIISAN-Scanner aufnehmen (v10) ──────────────── */
.kamera-bereich { margin-top: 8px; }
.kamera-box {
  margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.kamera-box .formfeld { margin-bottom: 10px; }
#kameraVideo, #kameraVorschau {
  display: block; width: 100%; max-width: 360px; max-height: 280px; margin: 0 auto 10px;
  border-radius: var(--radius-sm); background: #000; object-fit: contain;
}
.kamera-aktionen { margin-top: 4px; }
.kamera-aktionen .btn { flex: 1; min-width: 110px; }

/* ── Lagerplatz-Info "Rohteil"-artig (v11) ──────────────────── */
.formfeld-klein input { font-size: 14px; padding: 8px 10px; }
.platz-info { color: var(--brand-hover); }
.item-card-platzinfo { color: var(--brand-hover); font-weight: 600; }
