*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --surface: #1e1e35;
  --surface2: #252540;
  --accent: #e94560;
  --green: #4ecca3;
  --amber: #f5a623;
  --text: #e8e8f0;
  --text2: #9090b0;
  --text3: #ababb1;
  --border: #482a48;
  --nav-h: 62px;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* ── HEADER ── */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon {
  font-size: 28px;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.header-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.header-sub.online {
  color: var(--green);
}

.header-sub.offline {
  color: var(--accent);
}

/* Queue Badge */
.queue-badge {
  background: var(--amber);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Add Button */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s;
  box-shadow: 0 2px 12px rgba(233, 69, 96, .4);
}

.btn-icon:active {
  transform: scale(.92);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* ── OFFLINE BANNER ── */
.offline-banner {
  background: rgba(233, 69, 96, .1);
  border-bottom: 1px solid rgba(233, 69, 96, .25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ── UPDATE BANNER ── */
.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(78, 204, 163, .12);
  border-bottom: 1px solid rgba(78, 204, 163, .35);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
}

.update-text {
  flex: 1;
}

.btn-update {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 12px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.btn-update:active {
  background: var(--green);
  color: #000;
}

/* ── SHOP TABS ── */
.shop-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ── SUMMARY ── */
.summary-bar {
  background: var(--bg3);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}

.summary-sep {
  color: var(--text3);
}

#sum-price {
  color: var(--green);
  font-weight: 600;
}

/* ── VIEWS (list-view / shop-view) ── */
/* ── LIST CONTAINER ── */
/* ── LOADING / EMPTY ── */
.loading-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text2);
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-icon {
  font-size: 48px;
}

.empty-sub {
  font-size: 13px;
  color: var(--text3);
}

/* ── ITEM LIST ── */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
  padding: 14px 4px 4px;
}

.shop-group-header:first-child {
  padding-top: 4px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform .12s;
  position: relative;
  overflow: hidden;
}

.item-card:active {
  transform: scale(.985);
}

.item-card.checked {
  background: var(--bg3);
  border-color: var(--bg3);
  opacity: .5;
}

.item-card.checked .item-name {
  text-decoration: line-through;
  color: var(--text3);
}

.item-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--shop-color, var(--accent));
  border-radius: 14px 0 0 14px;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  display: flex;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.meta-chip {
  font-size: 11px;
  color: var(--text3);
  background: var(--bg);
  border-radius: 10px;
  padding: 1px 7px;
  border: 1px solid var(--border);
}

.meta-chip.price {
  color: var(--amber);
  border-color: rgba(245, 166, 35, .3);
}

.item-actions {
  display: flex;
  gap: 6px;
}

.btn-edit,
.btn-del {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  color: var(--text2);
}

.btn-edit svg,
.btn-del svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.btn-edit:active {
  background: var(--surface2);
  color: var(--amber);
}

.btn-del:active {
  background: rgba(233, 69, 96, .15);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── SHOP VIEW ── */
.shop-view-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text3);
}

.shop-view-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.shop-view-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--shop-color, var(--accent));
  border-radius: 14px 0 0 14px;
}

.shop-view-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--shop-color, var(--accent));
  flex-shrink: 0;
}

.shop-view-info {
  flex: 1;
}

.shop-view-name {
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.shop-view-count {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
  display: block;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 11px;
  font-family: var(--font);
  cursor: pointer;
  transition: color .15s;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
}

.nav-btn.nav-active {
  color: var(--accent);
}

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 200;
  backdrop-filter: blur(2px);
}

/* ── SHEETS ── */
.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 300;
  border-top: 1px solid var(--border);
  animation: slideUp .25s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex1 {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text3);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input option {
  background: var(--surface);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel,
.btn-save,
.btn-delete {
  flex: 1;
  padding: 13px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
}

.btn-cancel {
  background: var(--surface2);
  color: var(--text2);
}

.btn-save {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(233, 69, 96, .35);
}

.btn-delete {
  background: rgba(233, 69, 96, .15);
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-save:active {
  transform: scale(.97);
}

.btn-delete:active {
  background: var(--accent);
  color: #fff;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 500;
  border: 1px solid var(--border);
  white-space: nowrap;
  animation: fadeIn .2s ease-out;
}

.toast.success {
  border-color: var(--green);
  color: var(--green);
}

.toast.error {
  border-color: var(--accent);
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

/* ── CONFIRM ── */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(2px);
  padding: 20px;
}

.confirm-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 320px;
}

.confirm-msg {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  text-align: center;
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

/* ── PENDING (offline erstellt, noch nicht synchronisiert) ── */
.item-card.pending {
  border-color: rgba(245, 166, 35, .4);
}

.shop-view-card.pending {
  border-color: rgba(245, 166, 35, .4);
}

.pending-dot {
  font-size: 12px;
}

/* ── VORSCHLAG BANNER ── */
.vorschlag-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(78, 204, 163, .1);
  border: 1px solid rgba(78, 204, 163, .3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--green);
  animation: fadeIn .2s ease-out;
}

.vorschlag-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* ── ARTIKEL SUCHE STATUS ── */
.artikel-wrap {
  position: relative;
}

.artikel-suche-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

/* ── FORM LABEL HINT ── */
.form-label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text3);
}

/* ── ITEM CARD EINHEIT ── */
.meta-chip.einheit {
  color: var(--text2);
}

/* ── ARTIKEL DROPDOWN ── */
.artikel-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  list-style: none;
  z-index: 400;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.artikel-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  gap: 10px;
}

.artikel-dropdown-item:last-child {
  border-bottom: none;
}

.artikel-dropdown-item:active,
.artikel-dropdown-item:hover {
  background: var(--surface);
}

.dropdown-name {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.dropdown-name strong {
  color: var(--accent);
  font-weight: 700;
}

.dropdown-info {
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NUR DIE NEUEN CSS-REGELN — in die bestehende style.css einfügen
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Status-Zeile mit Reconnect-Button ── */
.status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

/* ── Reconnect-Button im Header (klein, neben Status) ── */
.btn-reconnect {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}

.btn-reconnect:active {
  background: rgba(233, 69, 96, .2);
}

.btn-reconnect svg {
  width: 11px;
  height: 11px;
}

/* ── Reconnect-Button im Offline-Banner ── */
.btn-reconnect-banner {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.btn-reconnect-banner:active {
  background: rgba(233, 69, 96, .2);
}

.btn-reconnect-banner svg {
  width: 13px;
  height: 13px;
}

/* ── Dreh-Animation beim Reconnect-Versuch ── */
.btn-reconnect.spinning svg,
.btn-reconnect-banner.spinning svg {
  animation: spin .7s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Neue CSS-Regeln für PWA v2 — ans Ende der style.css anfügen
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── SYNC STATUS ── */
.sync-status {
  background: rgba(78, 204, 163, .1);
  border-bottom: 1px solid rgba(78, 204, 163, .2);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 16px;
  text-align: center;
}

/* ── USER BADGE ── */
.user-badge {
  font-size: 11px;
  color: var(--text3);
  cursor: pointer;
  margin-top: 2px;
  display: block;
  transition: color .15s;
}

.user-badge:hover {
  color: var(--accent);
}

/* ── ERSTSTART DIALOG ── */
.fullscreen-dialog {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.erststart-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.erststart-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.erststart-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.erststart-text {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.erststart-btn {
  width: 100%;
  margin-top: 16px;
}

/* ── KONFLIKT DIALOG ── */
.konflikt-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.konflikt-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.konflikt-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.konflikt-header p {
  font-size: 13px;
  color: var(--text2);
}

.konflikt-liste {
  overflow-y: auto;
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.konflikt-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.konflikt-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.konflikt-item.geloest {
  opacity: .5;
}

.konflikt-name {
  background: var(--surface2);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.konflikt-versionen {
  display: flex;
}

.konflikt-version {
  flex: 1;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  transition: border-color .3s;
}

.konflikt-version:last-child {
  border-right: none;
}

.version-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text2);
}

.version-detail {
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 3px;
}

.btn-version-waehlen {
  margin-top: 8px;
  width: 100%;
  padding: 7px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}

.btn-lokal {
  background: var(--surface2);
  color: var(--text2);
}

.btn-server {
  background: rgba(78, 204, 163, .15);
  color: var(--green);
  border: 1px solid rgba(78, 204, 163, .3);
}

.btn-lokal:active {
  background: var(--border);
}

.btn-server:active {
  background: var(--green);
  color: #000;
}

/* ── VIEW CONTAINER ── */
/* ── Diese Regeln ans Ende der style.css anfügen ── */

/* Refresh-Button (grau, kleiner als der rote + Button) */
.btn-icon-secondary {
  background: var(--surface2);
  box-shadow: none;
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-icon-secondary:active {
  background: var(--border);
}

.btn-icon-secondary.spinning svg {
  animation: spin .7s linear infinite;
}

/* Fehler-Banner (rot) */
.fehler-banner {
  background: rgba(233, 69, 96, .1);
  border-bottom: 1px solid rgba(233, 69, 96, .3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  line-height: 1.5;
}

/* Sync-Zeit-Banner (amber, nur wenn Daten älter als 1 Stunde) */
.sync-zeit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(245, 166, 35, .08);
  border-bottom: 1px solid rgba(245, 166, 35, .25);
  color: var(--amber);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
}

.btn-sync-jetzt {
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--amber);
  background: transparent;
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.btn-sync-jetzt:active {
  background: var(--amber);
  color: #000;
}

/* ── Diese Regeln ans ENDE der style.css anfügen ──
   Sie überschreiben die alte .item-check Definition. */

/* Größerer Erledigt-Button — leichter zu treffen */
.item-check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  /* Unsichtbare Touch-Fläche vergrößern auf ~48px (Android-Empfehlung) */
  position: relative;
}

.item-check::after {
  content: '';
  position: absolute;
  inset: -8px;
  /* 34px + 2×8px = 50px Touch-Fläche */
}

.item-check svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  opacity: 0;
  transition: opacity .15s;
}

.item-card.checked .item-check {
  background: var(--green);
  border-color: var(--green);
}

.item-card.checked .item-check svg {
  opacity: 1;
}

/* ── Diese Regeln ans ENDE der style.css anfügen ── */

/* Trennlinie zwischen offenen und erledigten Einträgen */
.erledigt-trenner {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 6px;
}

.erledigt-trenner-linie {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.erledigt-trenner-inhalt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.erledigt-trenner-text {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  white-space: nowrap;
}

.btn-erledigte-loeschen {
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(233, 69, 96, .4);
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.btn-erledigte-loeschen:active {
  background: var(--accent);
  color: #fff;
}

/* ── Diese Regeln ans ENDE der style.css anfügen ──
   Flexbox-Layout statt fester Pixel-Berechnung.
   Passt sich automatisch an beliebig viele Banner an. */

/* Views als Flex-Spalte über die volle Höhe minus Navigation */
#list-view,
#shop-view {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--nav-h));
  overflow: hidden;
}

/* Header, Banner, Summary behalten ihre natürliche Höhe */
#list-view > .header,
#list-view > .update-banner,
#list-view > .sync-status,
#list-view > .offline-banner,
#list-view > .fehler-banner,
#list-view > .sync-zeit-banner,
#list-view > .summary-bar,
#shop-view > .header {
  flex-shrink: 0;
}

/* Liste nimmt den kompletten Rest ein und scrollt */
#list-view > .list-container,
#shop-view > .list-container {
  flex: 1;
  min-height: 0;         /* wichtig für Flexbox-Scrolling */
  overflow-y: auto;
  /* 24px unten damit der letzte Eintrag nicht an der Nav klebt */
  padding: 12px 12px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Ans ENDE der style.css anfügen ── */

/* Hervorhebung der abweichenden Werte im Konflikt-Dialog */
.detail-label {
  color: var(--text3);
}
.detail-diff {
  font-weight: 700;
  color: var(--amber);
}