:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --sidebar: #1f2937;
  --sidebar-hover: #374151;
  --sidebar-active: #2563eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-on-dark: #e5e7eb;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --radius: 8px;
  --sidebar-width: 250px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }

/* ---- Layout: Sidebar links, Inhalt rechts ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  background: var(--sidebar);
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.content-body { padding: 2rem; }

/* ---- Brand ---- */
.brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1rem; }
.brand-center { justify-content: center; padding: 0 0 1.5rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-weight: 700; letter-spacing: .5px;
}
.brand-text { font-weight: 600; line-height: 1.15; }
.brand-text small { font-weight: 400; font-size: .8rem; color: #9ca3af; }
.auth .brand-text { color: var(--text); }
.auth .brand-text small { color: var(--text-muted); }

/* ---- Navigation ---- */
.nav { display: flex; flex-direction: column; padding: .5rem .75rem; gap: 2px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem; border-radius: var(--radius);
  color: var(--text-on-dark); font-weight: 500;
}
.nav-link:hover { background: var(--sidebar-hover); }
.nav-link.is-active { background: var(--sidebar-active); color: #fff; }
.nav-icon { width: 1.1rem; text-align: center; opacity: .8; font-size: .85rem; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
.user-name { display: block; font-size: .9rem; margin-bottom: .5rem; color: #9ca3af; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: .55rem 1rem; border-radius: var(--radius);
  border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text-on-dark); border-color: rgba(255,255,255,.2); width: 100%; }
.btn-ghost:hover { background: var(--sidebar-hover); }
.btn-block { width: 100%; }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }

/* ---- Messages ---- */
.messages { padding: 1rem 2rem 0; }
.message { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: .75rem; }
.message-error { background: var(--error-bg); color: var(--error-text); }
.message-success { background: var(--success-bg); color: var(--success-text); }

/* ---- Login ---- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.auth-card label { display: block; font-size: .9rem; font-weight: 500; margin: .75rem 0 .3rem; }
.auth-card input[type="text"], .auth-card input[type="password"] {
  width: 100%; padding: .6rem .75rem; border: 1px solid #d1d5db; border-radius: var(--radius); font: inherit;
}
.auth-card input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.auth-card .btn-block { margin-top: 1.25rem; }

/* ---- Responsive ---- */
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .content-header, .content-body { padding: 1rem; }
}

/* ---- Navigation: Gruppen ---- */
.nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; padding: .9rem .75rem .3rem; }

/* ---- Kopfzeile ---- */
.content-header h1 small { font-size: .95rem; font-weight: 400; margin-left: .5rem; }
.count { display: inline-block; font-size: .8rem; font-weight: 500; color: var(--text-muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .6rem; vertical-align: middle; margin-left: .4rem; }
.header-actions { display: flex; gap: .5rem; }

/* ---- Toolbar / Formulare ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.25rem; }
.input { padding: .55rem .75rem; border: 1px solid #d1d5db; border-radius: var(--radius); font: inherit; background: var(--surface); }
.input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.input-search { flex: 1 1 280px; min-width: 200px; }
.check { display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; color: var(--text-muted); }
.btn-link { background: transparent; color: var(--primary); }
.btn-link:hover { text-decoration: underline; }
.btn-ghost-light { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost-light:hover { background: var(--bg); }
.segment { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.segment a { padding: .5rem .85rem; color: var(--text-muted); font-size: .92rem; }
.segment a.is-active { background: var(--primary); color: #fff; }

/* ---- Tabellen ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { background: var(--bg); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-compact { font-size: .88rem; }
.table-compact th, .table-compact td { padding: .4rem .5rem; }
.row-link { cursor: pointer; }
.row-link:hover { background: #f8fafc; }
.row-warn { background: #fffbeb; }
.row-warn:hover { background: #fef3c7; }
.neg { color: var(--error-text); }
.pos { color: var(--success-text); }
.muted { color: var(--text-muted); }
.empty { color: var(--text-muted); padding: 2rem 0; text-align: center; }

/* ---- Paging ---- */
.paging { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; }

/* ---- Kacheln ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile { display: flex; flex-direction: column; gap: .2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; color: var(--text); }
.tile:hover { border-color: var(--primary); }
.tile-value { font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.tile-label { font-size: .85rem; color: var(--text-muted); }
.tile-warn { border-color: #f59e0b; background: #fffbeb; }
.tile-warn .tile-value { color: #b45309; }

/* ---- Karten-Erweiterungen ---- */
.card-wide { grid-column: 1 / -1; }
.card h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
.kv-big dd { font-size: 1.05rem; }
.notes { white-space: pre-wrap; font: inherit; font-size: .9rem; margin: 0; color: var(--text); }
.hint { background: #eff6ff; color: #1e40af; border-radius: var(--radius); padding: .6rem .85rem; font-size: .88rem; margin: .75rem 0; }

/* ---- Badges ---- */
.badge { display: inline-block; font-size: .75rem; font-weight: 500; padding: .15rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.badge-ok { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
.badge-warn { background: #fef3c7; color: #92400e; border-color: transparent; }
.badge-err { background: var(--error-bg); color: var(--error-text); border-color: transparent; }

/* ---- Test-Banner ---- */
.env-banner { background: #b91c1c; color: #fff; text-align: center; font-weight: 600; padding: .45rem 1rem; letter-spacing: .03em; }

/* ---- Formulare ---- */
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-muted); margin-bottom: .25rem; }
.field .req { color: var(--error-text); }
.input-block { width: 100%; }
.field textarea.input { min-height: 4.5rem; resize: vertical; }
.field-check { align-self: end; }
.field-error { color: var(--error-text); font-size: .85rem; margin-top: .2rem; }
.has-error .input { border-color: var(--error-text); }
.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; }
.form-actions.sticky { position: sticky; bottom: 0; background: var(--bg); padding: .75rem 0; border-top: 1px solid var(--border); }
.field-inline { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-muted); }
.btn-big { padding: .8rem 1.4rem; font-size: 1rem; min-height: 48px; }
.btn-small { padding: .25rem .6rem; font-size: .8rem; vertical-align: middle; }
.btn-danger { background: #fff; color: var(--error-text); border-color: #fca5a5; margin-left: auto; }
.btn-danger:hover { background: var(--error-bg); }
.inline-form { display: inline; margin-top: .75rem; }
.card-narrow { max-width: 640px; }
.input-amount { width: 7rem; text-align: right; }
.quick { display: flex; flex-wrap: wrap; gap: .6rem; }
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.doclist { list-style: none; margin: 0; padding: 0; }
.doclist li { padding: .3rem 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.doclist li:last-child { border-bottom: 0; }
.tile-info { border-color: var(--primary); background: #eff6ff; }
.tile-info .tile-value { color: var(--primary); }
.pre { white-space: pre-wrap; }
table tfoot td { background: var(--bg); font-weight: 500; }

/* ---- Positionseditor ---- */
.editor-table td { vertical-align: top; position: relative; }
.editor-table .input { width: 100%; }
.editor-table .pos-text { min-height: 3.2rem; font-size: .9rem; }
.editor-table .num .input { text-align: right; }
.editor-table .art-info { font-size: .78rem; margin-top: .2rem; }
.editor-table tr.totals td { border-bottom: 0; font-weight: 500; }
.editor-table tr.total-gross td { font-size: 1.05rem; font-weight: 700; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; display: none; }
.suggest.open { display: block; }
.field { position: relative; }
.suggest-item { padding: .55rem .75rem; cursor: pointer; border-bottom: 1px solid var(--border); font-size: .9rem; }
.suggest-item:hover { background: #eff6ff; }
.suggest-empty { padding: .55rem .75rem; color: var(--text-muted); font-size: .9rem; }
.chosen { background: #eff6ff; border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .75rem; font-size: .92rem; }
.hidden { display: none; }

/* ---- Tablet: größere Touch-Ziele ---- */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .input, .table .row-link td { min-height: 44px; }
  .nav-link { padding: .8rem .75rem; }
  .input { font-size: 16px; }
}

/* ---- Dokumente ---- */
.doc-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; }
.doc-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; height: 1.6rem; border-radius: 4px; background: #dc2626; color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.doc-name { font-weight: 500; }
.doclist-files li { gap: .75rem; }
.col-pdf { width: 3.4rem; text-align: center; }
a.doc-icon:hover { background: #b91c1c; }
.doc-icon-none { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ---- Konsilager ---- */
.konsi-group h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.konsi-actions { margin-left: auto; display: inline-flex; gap: .4rem; }
.book-form { display: flex; gap: .3rem; align-items: center; }
.book-form .input-amount { width: 5.5rem; }
.konsi-book { min-width: 17rem; }

/* ---- Konsilager: ungemeldeter Abgang ---- */
td.abgang-offen { background: #fde047; font-weight: 700; }
.badge-abgang { background: #fde047; color: #713f12; border-color: transparent; }
.count-abgang { background: #fde047; color: #713f12; border-color: transparent; }

/* ===== Konsilager Redesign ===== */
.konsi-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.konsi-stats { display: flex; gap: .75rem; flex-wrap: wrap; }
.konsi-stats .stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .5rem 1rem; display: flex; flex-direction: column; min-width: 8.5rem; }
.konsi-stats .stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.konsi-stats .stat-label { font-size: .75rem; color: var(--text-muted); }
.konsi-stats .stat-abgang { background: #fef9c3; border-color: #fde047; }
.konsi-stats .stat-abgang .stat-value { color: #854d0e; }

.konsi-group { background: #cbcbcb; border: 1px solid #bdbdbd; border-radius: 14px; padding: 1rem 1.1rem 1.1rem; margin-bottom: 1.1rem; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.konsi-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.swatch { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg,#cbd5e1,#94a3b8); flex: 0 0 26px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch-light { box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.konsi-title { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.konsi-name { font-size: 1.12rem; font-weight: 700; letter-spacing: .01em; }
.konsi-color { font-size: .95rem; color: var(--text-muted); font-weight: 500; }
.konsi-figures { display: flex; gap: .6rem; margin-left: auto; }
.konsi-figure { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .25rem .7rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.konsi-figure strong { font-size: 1.05rem; }
.konsi-figure small { color: var(--text-muted); }
.figure-abgang { background: #fde047; border-color: #facc15; }
.figure-abgang small { color: #713f12; }
.konsi-actions { display: flex; gap: .35rem; align-items: center; }
.konsi-note { margin: .5rem 0 0; font-size: .85rem; color: var(--text-muted); }

.konsi-table-wrap { margin-top: .7rem; background: var(--surface); border: 1px solid #e2e2e2; border-radius: 10px; overflow-x: auto; }
.konsi-table { font-size: .87rem; }
.konsi-table thead th { background: #f8fafc; font-size: .72rem; letter-spacing: .06em; padding: .4rem .65rem; border-bottom: 1px solid #e2e8f0; }
.konsi-table td { padding: .3rem .65rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.konsi-table tbody tr:last-child td { border-bottom: 0; }
.konsi-table tbody tr:hover { background: #f8fafc; }
.konsi-table tr.dim td { color: #9ca3af; }
.konsi-table tr.dim strong { color: #9ca3af; font-weight: 500; }
.mono { font-variant-numeric: tabular-nums; }
.konsi-notizcell { font-size: .8rem; color: var(--text-muted); max-width: 18rem; }
td.abgang-offen { background: #fde047; font-weight: 700; text-align: right; }

.konsi-book { width: 15.5rem; }
.book-form { display: flex; gap: .25rem; align-items: center; justify-content: flex-end; }
.book-form .input-amount { width: 4.6rem; padding: .3rem .45rem; text-align: right; }
.book-btn { width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; background: var(--surface); border: 1px solid #d1d5db; color: var(--text); border-radius: 7px; }
.book-btn:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.book-in:hover { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }
.book-out:hover { border-color: #b45309; color: #b45309; background: #fffbeb; }

.konsi-recent { background: var(--surface); }
.konsi-recent .konsi-table-wrap { border-color: var(--border); }

@media (max-width: 900px) {
  .konsi-figures { margin-left: 0; width: 100%; }
  .konsi-book { width: 13rem; }
}

/* ---- Konsilager: Zubuchen-Dialog ---- */
.konsi-dialog { border: none; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 2rem)); box-shadow: 0 24px 60px rgba(15,23,42,.28); }
.konsi-dialog::backdrop { background: rgba(15,23,42,.45); }
.konsi-dialog form { padding: 1.4rem 1.5rem 1.5rem; margin: 0; }
.dialog-title { margin: 0 0 1rem; font-size: 1.15rem; }
.dialog-artikel { color: var(--primary); }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
.dialog-grid .field-wide { grid-column: 1 / -1; }
.dialog-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.dialog-actions .btn-primary { flex: 1; }
@media (max-width: 520px) { .dialog-grid { grid-template-columns: 1fr; } }

/* ---- Konsilager: Buchen-Dialog ---- */
.konsi-dialog-schmal { width: min(420px, calc(100vw - 2rem)); }
.book-context { margin: 0 0 1rem; line-height: 1.5; }
.book-context > span:first-child { font-weight: 600; }
.konsi-book { width: 10.5rem; }

/* ---- Konsilager: zweizeilige Buchungs-Buttons ---- */
.book-btn { width: 5.3rem; height: auto; min-height: 2.55rem; flex-direction: column; gap: 0; padding: .3rem .2rem; font-size: .72rem; font-weight: 600; line-height: 1.15; letter-spacing: .01em; }
.book-btn span { display: block; }
.konsi-book { width: 20rem; }
@media (max-width: 900px) { .konsi-book { width: 20rem; } }

/* ---- Konsilager: Position löschen ---- */
.book-del { width: 2.7rem; color: #9ca3af; }
.book-del:hover { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.btn-danger-solid { background: #dc2626; color: #fff; }
.btn-danger-solid:hover { background: #b91c1c; }
.hint-danger { background: #fef2f2; color: #991b1b; }
.konsi-book { width: 23rem; }

/* ---- KI-Assistent ---- */
.ki-dialog { width: min(680px, calc(100vw - 2rem)); padding: 1.1rem 1.25rem 1.25rem; }
.ki-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.ki-kopf .dialog-title { margin: 0; }
.ki-verlauf { height: min(46vh, 420px); overflow-y: auto; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; }
.ki-msg { max-width: 88%; padding: .55rem .8rem; border-radius: 12px; white-space: pre-wrap; font-size: .93rem; line-height: 1.45; }
.ki-msg-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ki-msg-ki { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.ki-msg-fehler { align-self: flex-start; background: var(--error-bg); color: var(--error-text); }
.ki-msg-aktion { align-self: stretch; max-width: 100%; background: #ecfdf5; color: #065f46; font-size: .8rem; text-align: center; }
.ki-warten { color: var(--text-muted); font-style: italic; }
.ki-dropzone { margin: .7rem 0; border: 2px dashed #cbd5e1; border-radius: 10px; padding: .7rem 1rem; text-align: center; color: var(--text-muted); font-size: .88rem; cursor: pointer; background: var(--surface); }
.ki-dropzone.aktiv { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.ki-datei { font-weight: 600; color: var(--text); }
.ki-eingabe { display: flex; gap: .6rem; align-items: flex-end; margin: 0; }
.ki-eingabe textarea { flex: 1; resize: none; }
.ki-anweisung { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.5; }

/* ---- Bestandsliste mailen ---- */
.mail-form .field { margin-bottom: .7rem; }
.mail-form textarea { resize: vertical; line-height: 1.5; }
.mail-anhang { display: flex; align-items: center; gap: .9rem; margin: 0; padding: .5rem .7rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.mail-anhang-datei { font-weight: 600; }
.mail-empfaenger { display: flex; flex-direction: column; gap: .35rem; }
.mail-empfaenger .check { font-size: .92rem; }
.mail-status { min-height: 1.2rem; margin: .2rem 0 .6rem; font-size: .9rem; font-weight: 600; }
.mail-status.mail-ok { color: #065f46; }
.mail-status.mail-fehler { color: var(--error-text); }

/* ---- Lieferschein-Abzug ---- */
.ls-liste { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: .7rem; }
.ls-eintrag { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .9rem; }
.ls-eintrag:last-child { border-bottom: 0; }
.ls-eintrag:hover { background: #eff6ff; }
.ls-verbucht { opacity: .65; }
.ls-nr { font-weight: 700; font-variant-numeric: tabular-nums; }
.ls-kunde { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-terminal { background: #0f172a; color: #d1d5db; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; line-height: 1.5; border-radius: 10px; padding: .8rem 1rem; height: min(34vh, 300px); overflow-y: auto; white-space: pre-wrap; }
.ls-terminal .ls-ok { color: #4ade80; }
.ls-terminal .ls-err { color: #fbbf24; }

/* ---- Lieferschein-Abzug: Schritt-Panel ---- */
.ls-schritt { margin-top: .7rem; border: 1px solid var(--primary); background: #eff6ff; border-radius: 10px; padding: .8rem 1rem; }
.ls-schritt-titel { font-weight: 700; margin-bottom: .45rem; }
.ls-schritt-detail { font-size: .82rem; margin-top: .4rem; font-variant-numeric: tabular-nums; }

/* ---- Abgang stornieren ---- */
.storno-btn { background: transparent; border: 0; padding: 0; font: inherit; font-weight: 700; color: #713f12; cursor: pointer; text-decoration: underline dotted; }
.storno-btn:hover { color: #b91c1c; }
