/* Lagersoftware Mein Arztbedarf – Web (Lagerrechner) */
:root {
  --bg: #f4f5f8; --panel: #fff; --text: #172033; --muted: #687086; --faint: #9aa1b2; --line: #e3e6ee;
  --primary: #2f45c9; --primary-dark: #2235a8; --primary-soft: #eef0fd;
  --green: #18965a; --green-soft: #e6f6ee; --amber: #c98a00; --amber-soft: #fff6dd; --red: #d33f3f; --red-soft: #fdecec;
  --violet: #7a4fd6; --side: #121a2e; --side-text: #c9cfe0; --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .klein { font-size: .85rem; } .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }
.rechts { text-align: right; } .nowrap { white-space: nowrap; } .fett { font-weight: 600; }
svg.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
svg.i-sm { width: 15px; height: 15px; } svg.i-lg { width: 26px; height: 26px; }

/* Grundgerüst */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 16px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: #fff; font-weight: 650; font-size: 1.02rem; }
.brand img { width: 32px; height: 32px; }
.brand small { display: block; color: #8b94ad; font-weight: 400; font-size: .76rem; }
.mc-zurueck { display: flex; align-items: center; gap: 8px; color: #8b94ad; font-size: .82rem; padding: 4px 10px 12px; }
.mc-zurueck:hover { color: #fff; text-decoration: none; }
.side-suche input { width: 100%; background: #1d2740; border: 1px solid #2a3554; color: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .88rem; margin-bottom: 10px; }
.side-suche input::placeholder { color: #7d87a3; }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a3554 transparent; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--side-text); font-size: .93rem; }
.nav a:hover { background: #1b2540; color: #fff; text-decoration: none; }
.nav a.on { background: var(--primary); color: #fff; }
.nav .cnt { margin-left: auto; background: #26314f; color: #dfe4f3; border-radius: 99px; padding: 0 8px; font-size: .75rem; line-height: 1.6; }
.nav a.on .cnt { background: rgba(255,255,255,.22); }
.nav .cnt.rot { background: var(--red); color: #fff; }
.nav-sec { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #6c7693; padding: 10px 10px 3px; }
.side-foot { margin-top: auto; border-top: 1px solid #222c47; padding-top: 12px; font-size: .84rem; display: flex; flex-direction: column; gap: 6px; }
.side-foot a { color: #9aa3bd; display: flex; align-items: center; gap: 8px; }
.side-foot strong { color: #fff; }
.modus-hinweis { display: inline-flex; align-items: center; gap: 6px; background: #2c2a1c; color: #f3d27a; border-radius: 6px; padding: 3px 8px; font-size: .78rem; }
.modus-hinweis.live { background: #173326; color: #7fe0ac; }
.main { padding: 22px 28px 60px; min-width: 0; }
.kopfzeile { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.kopfzeile .aktionen { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.untertitel { color: var(--muted); font-size: .92rem; margin-top: 2px; }

/* Banner + Meldungen */
.banner { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; font-size: .94rem; }
.banner.rot { background: var(--red-soft); border-color: #f3c1c1; color: #8f1f1f; }
.banner.gelb { background: var(--amber-soft); border-color: #f2dc9b; color: #6d4c00; }
.banner.blau { background: var(--primary-soft); border-color: #cfd5fa; color: #1f2f8f; }
.banner.gruen { background: var(--green-soft); border-color: #b6e4cb; color: #0f5d37; }
.banner .aktion { margin-left: auto; display: flex; gap: 6px; }
.banner form { margin: 0; }
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; background: var(--green-soft); color: #0f5d37; border: 1px solid #b6e4cb; }
.flash.fehler { background: var(--red-soft); color: #8f1f1f; border-color: #f3c1c1; }

/* Karten, Kacheln */
.karte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.karte + .karte { margin-top: 16px; }
.karte.eng { padding: 0; overflow: hidden; }
.karte-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.karte-kopf h2 { margin: 0; }
.karte-kopf .aktionen { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.raster { display: grid; gap: 16px; }
.raster.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kennzahl { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); }
a.kennzahl:hover { text-decoration: none; border-color: #c8cff0; }
.kennzahl .zahl { font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.kennzahl .label { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.kennzahl.gruen .zahl { color: var(--green); } .kennzahl.rot .zahl { color: var(--red); } .kennzahl.gelb .zahl { color: var(--amber); }
.balken { height: 8px; background: #edf0f6; border-radius: 99px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.balken.gruen > span { background: var(--green); }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid #eef0f5; vertical-align: middle; }
table.t tbody tr:hover { background: #f8f9ff; }
table.t tr.klickbar { cursor: pointer; }
table.t tr.aus td { color: var(--faint); }
table.t td.zahl, table.t th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
.leer { padding: 28px; text-align: center; color: var(--muted); }

/* Ampeln */
.ampeln { display: inline-flex; gap: 4px; }
.amp { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; position: relative; }
.amp svg { width: 15px; height: 15px; }
.amp.g { background: var(--green); } .amp.r { background: var(--red); } .amp.y { background: var(--amber); } .amp.n { background: #c7ccd8; }
.amp[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: #172033; color: #fff; font-size: .76rem; white-space: nowrap; padding: 4px 8px; border-radius: 6px; z-index: 5; }

/* Chips, Badges */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .88rem; }
.chip:hover { text-decoration: none; border-color: #c8cff0; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .n { background: #eef0f6; color: var(--muted); border-radius: 99px; padding: 0 7px; font-size: .76rem; }
.chip.on .n { background: rgba(255,255,255,.25); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: .76rem; font-weight: 600; background: #eef0f6; color: #4a5168; white-space: nowrap; }
.badge.gruen { background: var(--green-soft); color: #0f6b40; } .badge.rot { background: var(--red-soft); color: #a52626; }
.badge.gelb { background: var(--amber-soft); color: #7a5600; } .badge.blau { background: var(--primary-soft); color: var(--primary-dark); }
.badge.violett { background: #f1ebfd; color: #5a32b0; }
.mhd-rot { color: var(--red); font-weight: 650; } .mhd-orange { color: #d9661c; font-weight: 600; } .mhd-gelb { color: var(--amber); font-weight: 600; }
.flagge { font-size: 1.05rem; margin-right: 4px; }

/* Formulare, Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: .92rem; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #c4cbe2; background: #fbfbfe; }
.btn.primaer { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primaer:hover { background: var(--primary-dark); }
.btn.gruen { background: var(--green); border-color: var(--green); color: #fff; }
.btn.rot { background: #fff; border-color: #efc0c0; color: var(--red); }
.btn.gross { padding: 12px 20px; font-size: 1rem; border-radius: 10px; }
.btn.klein { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], select, textarea { font: inherit; font-size: .93rem; padding: 8px 10px; border: 1px solid #d5d9e4; border-radius: 8px; background: #fff; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c6cdf7; border-color: var(--primary); }
input.fehler { border-color: var(--red); background: #fff7f7; }
input.klein { width: 90px; } input.mittel { width: 150px; }
textarea { width: 100%; min-height: 70px; }
label.feld { display: flex; flex-direction: column; gap: 4px; font-size: .84rem; color: var(--muted); font-weight: 550; }
label.feld input, label.feld select { color: var(--text); }
.formzeile { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.formraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
form.inline { display: inline; margin: 0; }
.suchleiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.suchleiste input[type=search] { width: 320px; }

/* Wareneingang */
.we-zeile td { vertical-align: top; }
.we-zeile input { width: 100%; }
.vorschlag { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.vorschlag b { color: var(--green); }

/* Packen */
.packraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.paket { background: #fff; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.paket.fertig { border-color: #9fd9b8; background: #fbfefc; }
.paket.problem { border-color: #f0b4b4; }
.paket-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fafbfd; border-bottom: 1px solid var(--line); }
.fach { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.paket.fertig .fach { background: var(--green); }
.packzeile { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #f0f2f6; cursor: pointer; user-select: none; }
.packzeile .hk { width: 24px; height: 24px; border-radius: 6px; border: 2px solid #c5cbda; display: flex; align-items: center; justify-content: center; color: transparent; flex: none; }
.packzeile.ok .hk { background: var(--green); border-color: var(--green); color: #fff; }
.packzeile.ok .txt { color: var(--muted); text-decoration: line-through; text-decoration-color: #b9c0cf; }
.packzeile .menge { font-weight: 700; font-size: 1.05rem; min-width: 34px; }
.paket-fuss { padding: 10px 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Schritte (Picklauf) */
.schritt-nr { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: #eef0f6; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; }
.platz-tag { display: inline-block; font-weight: 700; font-family: ui-monospace, Consolas, monospace; background: #172033; color: #fff; border-radius: 6px; padding: 2px 8px; font-size: .9rem; }

/* Regalübersicht */
.regale { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.regal { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; font-size: .84rem; }
.regal b { font-size: 1.05rem; display: block; }

/* Modus-Schalter */
.modus-tabelle td { padding: 8px 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg label { padding: 6px 12px; cursor: pointer; font-size: .86rem; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg input { display: none; }
.seg input:checked + span { font-weight: 650; }
.seg label:has(input:checked) { background: var(--primary-soft); color: var(--primary-dark); }
.seg label.live:has(input:checked) { background: var(--green-soft); color: #0f6b40; }
.seg label.aus:has(input:checked) { background: #f1f2f5; color: #555; }

.qr-box svg { width: 150px; height: 150px; }
details summary { cursor: pointer; }
pre.json { background: #f6f7fb; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .78rem; white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; margin: 6px 0 0; }

@media (max-width: 1100px) { .raster.r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .raster.r3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .main { padding: 16px; }
  .raster.r2, .raster.r4 { grid-template-columns: 1fr; } .suchleiste input[type=search] { width: 100%; }
}
@media print { .side, .kopfzeile .aktionen, .banner, .flash { display: none; } .shell { display: block; } body { background: #fff; } }
