:root {
  --bg: #eef2f6;
  --card: #fff;
  --text: #1a2332;
  --muted: #64748b;
  --accent: #1e3a5f;
  --primary: #1e3a5f;
  --ok: #059669;
  --warn: #b45309;
  --err: #dc2626;
  --border: #e2e8f0;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
  /* Android Chrome pull-to-refresh = F5 → breaks offline */
  overscroll-behavior-y: none;
  overscroll-behavior: none;
}
html {
  height: 100%;
}
body {
  min-height: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen { min-height: 100vh; }
.hidden { display: none !important; }

.login-card {
  max-width: 400px;
  margin: 12vh auto 24px;
  padding: 24px 20px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
}
.login-card h1 { margin: 0 0 6px; color: var(--accent); }
.login-card label {
  display: block;
  margin: 12px 0 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.login-card input, .search, #node-name {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title strong {
  display: block;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .sub {
  display: block;
  font-size: 0.75rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-icon {
  border: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

.view { padding: 12px 12px calc(20px + var(--safe-bottom)); }
.banner {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fff8e1;
  border: 1px solid #e0b400;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #6b4e00;
  line-height: 1.4;
}

.net-banner {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.net-banner.offline {
  background: #7c2d12;
  color: #ffedd5;
}
.net-banner.pending {
  background: #1e3a5f;
  color: #e0f2fe;
  cursor: pointer;
}
.net-banner.sync {
  background: #0f766e;
  color: #ecfdf5;
}
.pending-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #fbbf24;
  color: #1a1a1a;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}
.leist-card.pending {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px #fbbf24;
}
.hint { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
}
.list-item:active { background: #f1f5f9; }
.list-item .title { font-weight: 700; font-size: 1.02rem; }
.list-item .meta { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.list-item.active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.list-item .depth { color: var(--muted); margin-right: 4px; }

.toolbar.sticky {
  position: sticky;
  top: 56px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 10px;
  background: var(--bg);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.btn-primary { background: var(--primary); }
.btn-secondary { background: #475569; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
/* Gold / gelb — Meimeter Einfügen (Zwischenablage) */
.btn-gold {
  background: linear-gradient(180deg, #facc15 0%, #eab308 100%);
  color: #422006;
  border: 1px solid #ca8a04;
  box-shadow: 0 1px 2px rgba(161, 98, 7, 0.25);
}
.btn-gold:not(:disabled):active {
  background: linear-gradient(180deg, #eab308 0%, #ca8a04 100%);
}
.btn-gold.has-clip {
  box-shadow: 0 0 0 2px #fde047, 0 1px 2px rgba(161, 98, 7, 0.25);
}
.btn-block { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: 0.5; }
.clipboard-hint {
  background: #fef9c3;
  border-color: #eab308;
  color: #713f12;
  font-size: 0.88rem;
}
.node-modal-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.leist-list { display: flex; flex-direction: column; gap: 12px; }
.leist-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
}
.leist-card.warn {
  border-color: #e0b400;
  background: #fffbeb;
}
.leist-card .name {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 1rem;
}
.leist-card label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 6px 0 3px;
}
.leist-card textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 1.05rem;
  resize: vertical;
}
.leist-card .row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 6px;
}
.leist-card select {
  flex: 0 0 80px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.leist-card .sum {
  flex: 1;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  padding-bottom: 8px;
}
.leist-card .warn-text {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--warn);
  line-height: 1.35;
}
.leist-card .row-btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.leist-card .row-btns .btn {
  flex: 1;
  margin-top: 0;
}
.leist-card .btn-save {
  margin-top: 0;
}

.pruef-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #fff8e1;
  border: 1px solid #e0b400;
  font-size: 0.9rem;
  line-height: 1.4;
}

.btn-gesamtsumme {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
  font-weight: 700;
}
.btn-gesamtsumme:active { filter: brightness(0.95); }
.modal-sheet-tall {
  max-height: min(92vh, calc(100% - 8px));
}
.modal-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.modal-head-row h3 { margin: 0; }
.table-wrap-mm {
  overflow: auto;
  max-height: min(55vh, 420px);
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.sum-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.sum-table th,
.sum-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.sum-table th {
  background: #f1f5f9;
  position: sticky;
  top: 0;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.sum-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sum-table .sum-cell { font-weight: 700; color: #0f766e; }
.sum-table .empty-state {
  text-align: center;
  color: var(--muted);
  padding: 20px 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* visualViewport sets --kb-inset when soft keyboard is open */
  padding-bottom: var(--kb-inset, 0px);
  box-sizing: border-box;
}
.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: min(85vh, calc(100% - 12px));
  overflow: auto;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
}
/* Name / Einfügen: sheet sits high so Abbrechen+Speichern stay above keyboard */
#node-modal.modal {
  align-items: flex-start;
  justify-content: center;
  padding-top: max(8px, env(safe-area-inset-top, 0px));
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: max(12px, var(--kb-inset, 0px));
}
#node-modal .modal-sheet {
  width: 100%;
  margin-top: 6px;
  border-radius: 14px;
  max-height: min(70vh, calc(100% - 16px - var(--kb-inset, 0px)));
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 14px 14px 16px;
}
#node-modal .row-btns {
  margin-top: 0;
  margin-bottom: 12px;
}
.modal-sheet h3 { margin: 0 0 12px; }
#node-modal .modal-sheet h3 { margin: 0 0 8px; font-size: 1.05rem; }

/* System-back danger lock (offline / unsynced cache) */
#back-block-modal {
  z-index: 200;
  background: rgba(80, 10, 10, 0.72);
}
.back-block-sheet {
  border: 3px solid #b91c1c;
  background: #fff7ed;
  max-width: 420px;
}
.back-block-sheet h3 {
  color: #991b1b;
  font-size: 1.15rem;
  margin: 0 0 10px;
}
.back-block-ru {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #7f1d1d;
}
.back-block-hr {
  border: none;
  border-top: 1px solid #fdba74;
  margin: 12px 0;
}
.back-block-list {
  margin: 8px 0 14px;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #431407;
}
#btn-back-block-ok {
  background: #b91c1c;
  border-color: #991b1b;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 12px;
}
.picker-list { max-height: 50vh; overflow: auto; margin: 10px 0; }
.row-btns {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.row-btns .btn { flex: 1; }

.status {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.status.ok { background: #ecfdf5; color: var(--ok); }
.status.err { background: #fef2f2; color: var(--err); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 100;
  max-width: 90%;
  padding: 12px 16px;
  background: #1e293b;
  color: #fff;
  border-radius: 10px;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* —— v5 mobile UX —— */
.btn-fertig {
  border: none;
  background: #0d9488;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-fertig:active { opacity: 0.9; }
.btn-laser {
  background: #7c3aed !important;
  color: #fff !important;
  border: none;
}
.btn-laser.connected { background: #059669 !important; }
.btn-laser.connecting { background: #a78bfa !important; }
.laser-bar {
  margin: 8px 12px;
  padding: 10px 12px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 12px;
}
.laser-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.laser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.laser-dot.off { background: #94a3b8; }
.laser-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.laser-dot.busy { background: #a78bfa; animation: pulse 1s infinite; }
.laser-dot.err { background: #ef4444; }
@keyframes pulse { 50% { opacity: 0.5; } }
.laser-status-text { font-size: 0.85rem; color: #4c1d95; flex: 1; }
.laser-last { font-weight: 700; color: #5b21b6; font-size: 0.9rem; }
.laser-modes { display: flex; gap: 6px; margin-bottom: 8px; }
.laser-mode {
  flex: 1;
  padding: 8px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.laser-mode.active { background: #7c3aed; color: #fff; border-color: #6d28d9; }
.laser-actions { display: flex; gap: 8px; }
.laser-actions .btn { flex: 1; }
.laser-hint { margin: 8px 0 0; font-size: 0.75rem; color: #64748b; }
.menge-raw {
  font-size: 1.2rem !important;
  min-height: 72px !important;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  /* native blinking caret (inputmode=none → no soft keyboard) */
  caret-color: #7c3aed;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}
.menge-raw.laser-target {
  outline: 2px solid #7c3aed;
  background: #faf5ff;
}
/* Explicit blinking | so insert position is always clear (esp. mobile) */
.menge-caret-line {
  margin: 4px 0 2px;
  padding: 6px 10px;
  min-height: 1.4em;
  font-size: 0.95rem;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  color: #334155;
  background: #f5f3ff;
  border: 1px dashed #a78bfa;
  border-radius: 8px;
  word-break: break-all;
  white-space: pre-wrap;
}
.menge-caret-line[hidden] {
  display: none !important;
}
.blink-caret {
  display: inline-block;
  color: #6d28d9;
  font-weight: 800;
  margin: 0 1px;
  animation: caret-blink 1s step-end infinite;
}
.caret-sel {
  background: #c4b5fd;
  color: #1e1b4b;
}
.caret-nl {
  color: #94a3b8;
  font-size: 0.85em;
}
@keyframes caret-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.calc-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.calc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.calc-bar button {
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}
.calc-bar button:active { background: #e2e8f0; }
.calc-bar button.active {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e3a8a;
}
.calc-digits button { min-width: 44px; flex: 1 1 18%; max-width: 56px; }
.calc-bksp { background: #fef2f2 !important; color: #b91c1c; }
.calc-space { min-width: 48px; }
.calc-abc-toggle {
  background: #eff6ff !important;
  color: #1d4ed8;
  min-width: 56px;
  font-size: 0.85rem;
}
.calc-note {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  background: #f0fdf4 !important;
  color: #166534;
  min-width: auto;
  padding: 0 10px;
}
.calc-letters button.calc-letter {
  min-width: 34px;
  min-height: 36px;
  font-size: 0.95rem;
  text-transform: none;
  flex: 0 0 auto;
}
.calc-hint {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}
.row-btns-extra {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.row-btns-extra .btn { flex: 1; font-size: 0.88rem; padding: 10px 8px; }
.bottom-fertig-wrap {
  padding: 12px 12px calc(16px + var(--safe-bottom));
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--bg) 30%);
}
.net-banner {
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.net-banner.offline { background: #fef3c7; color: #92400e; }
.net-banner.sync { background: #dbeafe; color: #1e40af; }
.net-banner.pending { background: #ffedd5; color: #9a3412; }
.net-banner .net-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}
.net-banner .net-actions button {
  border: none;
  background: #1e3a5f;
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.toolbar.sticky {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg);
  position: sticky;
  top: 48px;
  z-index: 15;
}
.toolbar .btn { flex: 1 1 auto; min-width: 30%; font-size: 0.85rem; padding: 10px 8px; }

/* —— Tree hierarchy (EG → Küche → Spüle) —— */
#tree-list {
  padding: 4px 8px 16px;
}
#tree-list .tree-node {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 6px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
  position: relative;
}
#tree-list .tree-node .tree-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 56px;
}
#tree-list .tree-rail {
  flex: 0 0 calc(12px + var(--tree-depth, 0) * 22px);
  max-width: 140px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 20px,
      #cbd5e1 20px,
      #cbd5e1 21px
    );
  background-color: #f1f5f9;
  border-right: 3px solid #94a3b8;
  opacity: 0.95;
}
#tree-list .tree-node.depth-0 .tree-rail {
  flex-basis: 10px;
  background: #1e3a5f;
  border-right-color: #1e3a5f;
}
#tree-list .tree-node.depth-1 .tree-rail { border-right-color: #0d9488; background-color: #ccfbf1; }
#tree-list .tree-node.depth-2 .tree-rail { border-right-color: #7c3aed; background-color: #ede9fe; }
#tree-list .tree-node.depth-3 .tree-rail { border-right-color: #ea580c; background-color: #ffedd5; }
#tree-list .tree-node.depth-4 .tree-rail,
#tree-list .tree-node.depth-5 .tree-rail,
#tree-list .tree-node.depth-6 .tree-rail { border-right-color: #0891b2; background-color: #ecfeff; }

#tree-list .tree-branch {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 700;
}
#tree-list .tree-node.depth-0 .tree-branch { color: #1e3a5f; }
#tree-list .tree-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px 10px 4px;
}
#tree-list .tree-node .title {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.25;
}
#tree-list .tree-parent {
  color: #0f766e;
  font-weight: 600;
}
#tree-list .tree-node.depth-0 .tree-parent { color: #1e3a5f; }
#tree-list .tree-node.active {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25);
}
#tree-list .tree-node:active {
  background: #f8fafc;
}

/* —— Meimeter-tradition tree (nested indent) —— */
.tree-hint { margin: 0 12px 8px; font-size: 0.8rem; }
.tree-list-host {
  padding: 4px 8px 20px !important;
  background: transparent !important;
}
.meimeter-tree.tree {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 6px;
  background: #fff;
  max-height: none;
}
.meimeter-tree .tree-node {
  margin-left: 0;
}
.meimeter-tree .tree-children {
  margin-left: 16px;
  border-left: 2px dashed #cbd5e1;
  padding-left: 6px;
}
.meimeter-tree .tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}
.meimeter-tree .tree-item:active {
  background: #f1f5f9;
}
.meimeter-tree .tree-item.active {
  background: #e0f2fe;
  box-shadow: inset 0 0 0 2px #0284c7;
}
.meimeter-tree .tree-toggle {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: #1e3a5f;
  cursor: pointer;
  padding: 0;
}
.meimeter-tree .tree-toggle.is-leaf {
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: default;
}
.meimeter-tree .tree-item-label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.meimeter-tree .tree-item-label strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.meimeter-tree .tree-child-count {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #5eead4;
  border-radius: 999px;
  padding: 2px 8px;
}
.meimeter-tree .tree-todo-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #854d0e;
  background: #fde047;
  border: 1px solid #eab308;
  border-radius: 999px;
  padding: 1px 6px;
}
.meimeter-tree .tree-item.has-children .tree-item-label strong {
  color: #0f172a;
}
.meimeter-tree .tree-item.is-collapsed .tree-toggle {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

/* Leistung picker — groups from Preisliste (Abd Sopro / Abd Codex) */
.picker-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.picker-group-chip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.picker-group-chip:active { background: #e2e8f0; }
.picker-group-chip .chip-n {
  font-size: 0.72rem;
  background: #0e7490;
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-weight: 800;
}
.picker-pick-hint { color: var(--muted); font-size: 0.9rem; }

/* Multi-select checklist (Meimeter-style) */
.picker-check-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px 12px;
  margin: 0 0 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}
.picker-check-item.disabled {
  opacity: 0.55;
  background: #f8fafc;
}
.picker-check-item input {
  width: 22px;
  height: 22px;
  margin: 0;
}
.picker-check-name {
  font-weight: 700;
  grid-column: 2;
}
.picker-check-unit {
  color: var(--muted);
  font-size: 0.85rem;
  grid-column: 3;
}
.picker-check-grp,
.picker-check-taken {
  grid-column: 2 / -1;
  font-size: 0.75rem;
  color: var(--muted);
}
.picker-check-taken { color: #0f766e; font-weight: 600; }
.picker-multi-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}
.picker-multi-actions .btn { flex: 1; padding: 12px 10px; }
.picker-multi-actions.hidden { display: none !important; }

/* Fertig — zurück at top of main window */
.fertig-bar {
  padding: 10px 12px 8px;
  background: #ecfdf5;
  border-bottom: 2px solid #0d9488;
  position: sticky;
  top: 0;
  z-index: 25;
}
.fertig-bar.hidden { display: none !important; }
.btn-fertig-main {
  background: #0d9488 !important;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}
.btn-fertig-main:active { opacity: 0.92; }
/* topbar sits above; fertig bar sticks below net if needed */
#app-screen > .topbar { z-index: 30; }
.fertig-bar { top: 0; }
/* when topbar sticky, pin fertig under it */
#app-screen > .topbar { position: sticky; top: 0; }
.fertig-bar { top: 48px; }
.meimeter-tree .tree-item.long-press {
  background: #fef9c3 !important;
  box-shadow: inset 0 0 0 2px #eab308;
}
