/* =====================================================================
   Aufmaßsoftware – Speckmann App-Design (Variante „C · Clean mit Farb-Icons“)
   Stand v7.0, 10.10.2026 – gleiche Farben, Abstände, Rundungen und Symbole
   wie die Stundenzettel-App ab v25/v26. Nur Optik, keine Funktionen.
   Farben nur über die Variablen in :root ändern.
   ===================================================================== */

/* ---- 1. Farben und Grundwerte (Speckmann) ---- */
:root {
  --orange: #ef5a24; --orange-dark: #d14a17; --orange-tint: #fdeee7; --orange-ink: #a8400f;
  --ink: #1f2023; --bg: #f2f3f6; --card: #ffffff; --field: #f2f3f6;
  --text: #1b1c1f; --muted: #6b6f78; --line: #e6e7ea;
  --green: #1d8a5b; --green-tint: #e3f4ec; --blue: #2563b8; --blue-tint: #e6eefb;
  --violet: #6a52c9; --violet-tint: #efebfb; --gray-tint: #eceef1;
  --red: #c0392b; --red-tint: #fdecea;
  --radius: 16px;
  --blue-dark: var(--ink);

  /* bisherige Variablennamen der App, zeigen jetzt auf die Speckmann-Farben */
  --color-bg: var(--bg);
  --color-surface: var(--card);
  --color-primary: var(--ink);
  --color-primary-light: var(--orange-ink);
  --color-accent: var(--orange);
  --color-border: var(--line);
  --color-text: var(--text);
  --color-text-muted: var(--muted);
  --color-danger: var(--red);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 61px;
}

/* ---- 2. Grundlayout ---- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden-Attribut greift immer, auch wenn eine Klasse display setzt */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }

svg.ic {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: inline-block; vertical-align: middle;
}

/* ---- 3. Kopfzeile (fest oben, weiß, dunkler Streifen hinter der iPhone-Statusleiste) ---- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  color: var(--text);
  background: linear-gradient(var(--ink), var(--ink)) top/100% var(--safe-top) no-repeat, rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  padding-top: var(--safe-top);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: calc(var(--header-h) - 1px);
  padding: 10px 16px;
  max-width: 640px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.brand-tile {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.brand-tile svg.ic { width: 21px; height: 21px; }
.brand-text { min-width: 0; }
.header-inner h1 {
  font-size: 17px; margin: 0; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .sub { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.head-btns { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--field);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.icon-btn:active { background: var(--line); }

.logo-strip {
  background: #fff;
  padding: 12px 16px 14px;
  text-align: center;
  margin-top: calc(var(--header-h) + var(--safe-top));
}
.logo-strip img { max-height: 46px; width: auto; max-width: 100%; display: inline-block; }

main#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px calc(40px + var(--safe-bottom));
}

.view { display: flex; flex-direction: column; gap: 14px; }

/* ---- 4. Karten und Bereichs-Überschriften mit Farb-Symbol ---- */
.section-card {
  background: var(--card);
  border: none;
  border-radius: var(--radius);
  padding: 4px 16px 16px;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 4px 14px rgba(20, 22, 28, .04);
}
.section-card > summary {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-card > summary::-webkit-details-marker { display: none; }
.section-card > summary > span:not(.ht) { min-width: 0; }
.section-card > summary::after,
.ms-gruppe-det > summary.ms-gruppe::after,
.gesendet-bereich > summary::after,
.vorlagen-verwaltung > summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
  flex: 0 0 auto;
  margin-left: auto; margin-right: 4px;
}
.section-card:not([open]) > summary::after,
.ms-gruppe-det:not([open]) > summary.ms-gruppe::after,
.gesendet-bereich:not([open]) > summary::after,
.vorlagen-verwaltung:not([open]) > summary::after { transform: rotate(-45deg); }
div.section-card { padding-top: 16px; }

.ht {
  width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.ht svg.ic { width: 18px; height: 18px; }
.ht-orange { background: var(--orange-tint); color: var(--orange); }
.ht-green { background: var(--green-tint); color: var(--green); }
.ht-blue { background: var(--blue-tint); color: var(--blue); }
.ht-violet { background: var(--violet-tint); color: var(--violet); }
.ht-gray { background: var(--gray-tint); color: #4b4f57; }
.ht-ink { background: var(--ink); color: #fff; }

/* ---- 5. Formularfelder ---- */
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.field-grid.two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}
label.full { grid-column: 1 / -1; }

/* :where() hält die Spezifität niedrig, damit kleinere Felder (Mengen) eigene Breiten behalten */
input:where(:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range])),
textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  background-color: var(--field);
  color: var(--text);
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b6f78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px !important;
}
input[type=date] { display: block; }
input::placeholder, textarea::placeholder { color: #9a9ea6; }
textarea { resize: vertical; min-height: 64px; line-height: 1.4; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange) !important;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(239, 90, 36, .12);
}
input[readonly] { background-color: #e9ebef; color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--orange); width: 18px; height: 18px; }

.hint { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 6px 0; margin: 0; }

/* ---- 6. Buttons ---- */
.btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 48px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  background: var(--field);
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn svg.ic { width: 19px; height: 19px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(239, 90, 36, .28); }
.btn-primary:active { background: var(--orange-dark); }
.btn-secondary { background: var(--field); color: var(--text); }
.btn-secondary:active { background: var(--line); }
.btn-secondary:disabled { background: var(--field); color: var(--muted); }
.btn-outline { background: var(--red-tint); color: var(--red); }
.btn-outline-neutral { background: var(--field); color: var(--text); }
.btn-outline-neutral:active { background: var(--line); }
.btn-gross { width: 100%; min-height: 52px; padding: 14px 16px; font-size: 16px; }

.btn-danger-text {
  background: none; border: none; color: var(--red);
  font-size: 14px; font-weight: 600; font-family: inherit;
  padding: 6px 8px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-danger-text svg.ic { width: 17px; height: 17px; }
/* Löschen-Knöpfe nur mit Symbol (Tabellen, Karten) */
td.col-del .btn-danger-text,
.schaltung-kopf .btn-danger-text,
.stripe-kopf .btn-danger-text,
.komp-aktionen .btn-danger-text,
.zeile-aktionen .btn-danger-text {
  width: 36px; height: 36px; padding: 0; background: var(--red-tint);
}
.btn-link-accent {
  background: none;
  border: none;
  color: var(--orange-ink);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 0;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-link-accent svg.ic { width: 17px; height: 17px; }
.btn-link-accent:active { opacity: .7; }
#standardExportHinweis a { color: var(--orange-ink); font-weight: 600; }

.action-bar { display: flex; gap: 10px; flex-wrap: wrap; }
.action-bar .btn-primary { flex: 1; }
.autosave-hint { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }

/* ---- 7. Tabs, Umschalter, Chips ---- */
.tabs {
  display: flex; gap: 3px; margin-bottom: 12px; padding: 3px;
  background: var(--field); border-radius: 13px;
  overflow-x: auto; scrollbar-width: none;
}
.tab {
  flex: 1; background: transparent; border: none; border-radius: 10px;
  padding: 10px 8px; font-size: 14px; font-weight: 600; font-family: inherit;
  color: var(--muted); white-space: nowrap; cursor: pointer;
}
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 22, 28, .12); }
.tab-panel { display: flex; flex-direction: column; gap: 10px; }

.segment, .einheit-wahl {
  display: flex; background: var(--field); border: none; border-radius: 13px;
  padding: 3px; gap: 3px; overflow: hidden;
}
.segment-btn, .einheit-wahl button {
  flex: 1; border: none !important; background: transparent; border-radius: 10px;
  padding: 9px 4px; font-size: 14px; font-weight: 600; font-family: inherit;
  color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.segment-btn.aktiv, .einheit-wahl button.aktiv {
  background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20, 22, 28, .12);
}
.einheit-wahl { margin-top: 6px; border-radius: 10px; padding: 2px; }
.einheit-wahl button { padding: 5px 4px; font-size: 12.5px; border-radius: 8px; }
.rollo-bedienung-label { font-size: 13px; color: var(--muted); font-weight: 600; margin: 10px 0 6px; }
.rollo-bedien-anzahl:not(:empty) { margin-top: 4px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.chip {
  background: var(--field);
  border: none;
  border-radius: 22px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s;
}
.chip svg.ic { width: 17px; height: 17px; }
.chip:active { background: var(--line); }
.chip:disabled { opacity: .4; cursor: default; }
.chip.chip-benutzt { background: var(--ink); color: #fff; }
.chip.chip-benutzt::after { content: " ✓"; color: #c9cbd0; }
.chip-schaltung { border-radius: 12px; background: var(--orange-tint); color: var(--orange-ink); margin-top: 4px; }
.ordner-vorschlag { margin-top: 8px; background: var(--orange-tint); color: var(--orange-ink); }
.raum-schnell { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2px; }
.raum-schnell .chip { background: #fff; box-shadow: 0 1px 2px rgba(20, 22, 28, .06); }

.kategorie-titel-klein {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); margin-top: 8px;
}
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }
.inline-add .btn { white-space: nowrap; }

/* ---- 8. Vorschlagslisten (Kunde, Material) ---- */
.autocomplete { position: relative; }
.suggest-list {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  max-height: 300px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  box-shadow: 0 12px 30px rgba(20, 22, 28, .16);
}
.suggest-list li {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.3;
}
.suggest-list li:last-child { border-bottom: none; }
.suggest-list li:active, .suggest-list li.highlight { background: var(--field); }
.suggest-list li small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
.suggest-list .no-result { color: var(--muted); cursor: default; font-weight: 400; }
.suggest-list .ean-neu-eintrag { color: var(--orange-ink); }

.standard-liste {
  border: 1px solid var(--line); border-radius: 14px;
  max-height: 280px; overflow-y: auto; padding: 4px;
}
.standard-liste .kategorie-titel {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px;
}
.standard-liste .artikel-zeile { padding: 10px; border-radius: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.3; }
.standard-liste .artikel-zeile:active, .standard-liste .artikel-zeile.highlight { background: var(--field); }
.standard-liste .artikel-zeile small { display: block; color: var(--muted); font-size: 12px; }
.standard-liste .no-result { color: var(--muted); padding: 10px; font-size: 14px; }

.selected-article { background: var(--blue-tint); border: none; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.selected-article strong { display: block; margin-bottom: 2px; }
.selected-article .muted { color: var(--muted); }

/* ---- 9. Tabellen (Materialliste, Packliste, Raum) und Mengen ---- */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; padding-top: 4px; }
td.col-menge { min-width: 132px; }
td.col-del { text-align: right; white-space: nowrap; }
.row-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.menge-control { display: inline-flex; align-items: center; background: var(--field); border-radius: 12px; overflow: hidden; }
.menge-control input:not([type=checkbox]) {
  width: 56px; min-height: 36px; padding: 4px 2px; text-align: center; font-weight: 700;
  background-color: transparent; border-radius: 0; border: none;
}
.menge-control input:focus { box-shadow: none; background-color: transparent; }
.btn-qty {
  width: 36px; height: 36px; min-width: 36px;
  border: none; background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; border-radius: 0;
}
.btn-qty svg.ic { width: 18px; height: 18px; }
.btn-qty:active { background: var(--line); }
.menge-add { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.menge-add input:not([type=checkbox]) { width: 64px; min-height: 34px; padding: 4px 6px; font-size: 15px; text-align: center; border-radius: 10px; }
.btn-qty-add {
  background: var(--orange-tint); color: var(--orange-ink); border: none; border-radius: 10px;
  padding: 7px 10px; font-size: 12.5px; font-weight: 700; font-family: inherit; white-space: nowrap; cursor: pointer;
}
.btn-qty-add:active { opacity: .85; }

td.col-check { width: 36px; padding-right: 0; }
.check-btn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 2px solid #d9dbe0; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: transparent; padding: 0; cursor: pointer;
}
.check-btn svg.ic { width: 16px; height: 16px; stroke-width: 2.6; }
.check-btn.checked { background: var(--green); border-color: var(--green); color: #fff; }
tr.zeile-gepackt td { color: var(--muted); }
tr.zeile-gepackt .bez-text { text-decoration: line-through; }

.export-options { padding: 4px 2px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); flex-direction: row; }
.checkbox-label input { width: auto; padding: 0; }

/* ---- 10. Startseite, Listen ---- */
.empty-state { text-align: center; color: var(--muted); font-size: 14px; padding: 22px 10px; background: var(--field); border-radius: 14px; }
.empty-state p { margin-bottom: 16px; }

.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.aufmass-card {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 13px 12px 13px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 4px 14px rgba(20, 22, 28, .04);
}
.aufmass-card:active { background: #fafafb; }
.aufmass-card .info { flex: 1; min-width: 0; }
.aufmass-card .kunde { font-weight: 700; font-size: 15px; margin: 0 0 3px; }
.aufmass-card .meta { color: var(--muted); font-size: 13px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); display: inline-flex; align-items: center; }
.chevron svg.ic { width: 18px; height: 18px; }

.section-heading-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-heading-row-spaced { margin-top: 28px; }
.section-heading-row h2 { font-size: 16.5px; font-weight: 700; color: var(--text); margin: 0; }
.btn-add-inline {
  background: var(--orange); color: #fff; border: none;
  width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.kachel {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: none; border-radius: var(--radius); padding: 16px 14px;
  font: inherit; color: var(--text); cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 4px 14px rgba(20, 22, 28, .04);
}
.kachel:active { background: #fafafb; }
.kachel-icon.ht { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; }
.kachel-icon.ht svg.ic { width: 22px; height: 22px; }
.kachel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kachel-text strong { font-size: 16px; font-weight: 700; }
.kachel-text small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kachel-gross { padding: 22px 16px; gap: 16px; }
.kachel-gross .kachel-icon.ht { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 16px; }
.kachel-gross .kachel-icon.ht svg.ic { width: 28px; height: 28px; }
.kachel-gross .kachel-text strong { font-size: 19px; letter-spacing: -.01em; }
.kachel-gross .kachel-text small { font-size: 13.5px; white-space: normal; }
.kachel-hinweis { background: var(--orange-tint); }
.cloud-status-text.ok { color: var(--green); }
.cloud-status-text.wartet { color: var(--orange-ink); }
.cloud-status-text.fehler { color: var(--red); white-space: normal; }

/* Einstellungen-Zeile (Startseite) */
.einstellung-knopf {
  width: 100%; margin-top: 4px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; color: var(--text);
  border: none; border-radius: 14px; padding: 12px 14px;
  font: inherit; font-size: 15.5px; font-weight: 700; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 22, 28, .04), 0 4px 14px rgba(20, 22, 28, .04);
}
.einstellung-knopf::after {
  content: ""; margin-left: auto; margin-right: 6px; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-top: 2px solid var(--muted); transform: rotate(45deg);
}
.einstellung-knopf:active { background: #fafafb; }
.einstellung-knopf.kachel-hinweis { background: var(--orange-tint); color: var(--orange-ink); }

/* Gesendet-Markierung */
.gesendet-status {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  margin: 14px 0 4px; padding: 10px 14px; border-radius: 14px; border: none;
  font-size: 14px; color: var(--muted); background: #fff;
}
.gesendet-status.ist-gesendet { background: var(--green-tint); color: var(--green); font-weight: 600; }
.gesendet-status .btn-link-accent { font-weight: 600; }
.gesendet-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 20px;
  background: var(--green-tint); color: var(--green); border: none;
  font-size: 11.5px; font-weight: 700; vertical-align: middle; white-space: nowrap;
}
.gesendet-bereich { margin-top: 10px; }
.gesendet-bereich > summary {
  cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted); padding: 10px 2px;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.gesendet-bereich > summary svg.ic { width: 17px; height: 17px; color: var(--green); }
.gesendet-bereich > summary::-webkit-details-marker { display: none; }
.gesendet-bereich .card-list { margin-top: 4px; }
.aufmass-card.gesendet { opacity: .85; }

/* ---- 11. Hinweis-Leisten (Update, Sync) ---- */
.update-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom));
  z-index: 45; background: var(--ink); color: #fff;
  padding: 10px 12px 10px 16px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 14px; font-weight: 500;
  max-width: 616px; margin: 0 auto;
}
.update-banner .btn-secondary { min-height: 38px; padding: 8px 14px; font-size: 14px; background: rgba(255, 255, 255, .14); color: #fff; }
.update-banner .btn-danger-text { color: #fff; }
.sync-hinweis { bottom: auto; top: calc(var(--header-h) + var(--safe-top) + 8px); }

/* ---- 12. Barcode-Scanner ---- */
.suche-mit-scan { display: flex; gap: 8px; }
.suche-mit-scan input { flex: 1; min-width: 0; }
.btn-scan {
  width: 48px; min-width: 48px; height: 48px;
  border-radius: 12px; border: none; background: var(--field); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.btn-scan:active { background: var(--line); }

.scanner-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 22, 28, .6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  overflow-y: auto;
}
.scanner-box {
  background: #fff; border-radius: 22px; width: 100%; max-width: 420px;
  overflow: hidden; display: flex; flex-direction: column;
  max-height: calc(100vh - 24px - var(--safe-top) - var(--safe-bottom)); overflow-y: auto;
  box-shadow: 0 12px 30px rgba(20, 22, 28, .25);
}
.scanner-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 16px; background: #fff; color: var(--text);
  font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--line);
}
.scanner-header .scanner-x { width: 40px; height: 40px; }
#scannerReader { width: 100%; background: #000; min-height: 0; max-height: 34vh; overflow: hidden; }
#scannerReader video { max-height: 34vh; width: 100% !important; object-fit: cover; }
.scanner-box .hint { text-align: center; padding: 10px 16px 4px; margin: 0; }
.scanner-manuell { padding: 8px 16px 16px; }
.scanner-manuell-row { display: flex; gap: 8px; margin-top: 4px; }
.scanner-manuell-row input { flex: 1; min-width: 0; }
.scanner-manuell-row .btn { white-space: nowrap; }
.scanner-abbrechen { width: 100%; margin-top: 12px; }

/* ---- 13. Bauaufmaß: Etagen, Räume, Zähler, Karten ---- */
.etagen-liste { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.etage-karte { border: none; border-radius: 14px; padding: 12px 12px 10px; background: var(--field); }
.etage-karte select, .etage-karte input:not([type=checkbox]) { background-color: #fff; }
.etage-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.etage-name { font-size: 15.5px; font-weight: 700; }
.etage-aktionen { display: flex; gap: 6px; }
.btn-mini, .ks-ib {
  width: 34px; height: 34px; min-width: 34px;
  border-radius: 10px; border: none; background: var(--field); color: var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
.btn-mini svg.ic, .ks-ib svg.ic { width: 17px; height: 17px; }
.etage-karte .btn-mini { background: #fff; }
.btn-mini:disabled { opacity: .35; }
.btn-mini-danger, .ks-ib.ks-del { color: var(--red); background: var(--red-tint) !important; }
.raum-liste { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.raum-leer { padding: 2px 0; }
.raum-karte {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
}
.raum-karte:active { background: #fafafb; }
.raum-karte .info { flex: 1; min-width: 0; }
.raum-karte .kunde { font-weight: 700; margin: 0 0 2px; font-size: 15px; }
.raum-karte .meta { color: var(--muted); font-size: 12.5px; margin: 0; }
.raum-add-panel { padding-top: 2px; }
.raum-kopf-karte { padding-top: 16px; }

.zaehler-zeile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.zaehler-zeile:last-child { border-bottom: none; }
.zaehler-label { font-size: 14.5px; color: var(--muted); }
.zaehler-zeile.aktiv .zaehler-label { color: var(--text); font-weight: 600; }
.zaehler-zeile .menge-control input:not([type=checkbox]) { width: 48px; }
.zaehler-zeile .btn-qty { width: 40px; height: 40px; min-width: 40px; }

.schaltungen-liste { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.schaltung-karte { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px 12px; }
.schaltung-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.schaltung-kopf strong { font-size: 15px; }
.zaehler-schaltstellen { border-bottom: 1px dashed var(--line); }
.schaltung-bemerkung { margin-top: 6px; }
.raum-aktionen { justify-content: space-between; }

.auswahl { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
select.auswahl-select {
  font-weight: 600; color: var(--orange-ink); background-color: var(--orange-tint); border: 1.5px solid transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23a8400f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E");
}
.etage-karte select.auswahl-select { background-color: var(--orange-tint); }
.etage-karte .auswahl { margin-top: 2px; }
.segment-feld { margin: 2px 0 6px; }
.komp-felder { display: flex; flex-direction: column; }
.komp-select {
  flex-direction: row; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text); font-weight: 600;
}
.komp-select select { width: auto; max-width: 62%; min-height: 40px; padding: 8px 12px; font-size: 14.5px; }
.komp-karte .segment-btn { padding: 8px 2px; font-size: 13px; }
.melder-typ { margin-top: 2px; margin-bottom: 4px; }
.komp-aktionen { display: flex; align-items: center; gap: 6px; }
.komp-kopie { padding: 6px 8px; font-size: 13px; }
.unter-auswahl { margin: 0 0 6px 0; }
.stripes { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 2px; }
.stripe-box { border: 1px dashed #d9dbe0; border-radius: 12px; padding: 8px 10px; background: #fff; }
.stripe-kopf { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stripes .btn-link-accent { align-self: flex-start; }
.stripe-box .segment-feld { margin-bottom: 4px; }
.raum-installation { margin-top: 8px; }
.raum-installation .segment-btn { font-size: 13px; padding: 8px 2px; }
.standard-typen { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.vorlagen-verwaltung { margin-top: 10px; }
.vorlagen-verwaltung > summary {
  cursor: pointer; font-size: 14px; font-weight: 700; color: var(--muted); padding: 8px 2px;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.vorlagen-verwaltung > summary::-webkit-details-marker { display: none; }
.vorlagen-verwaltung > summary svg.ic { width: 17px; height: 17px; }

/* Produktliste, Abdeckungen */
.produkt-auswahl { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.produkt-auswahl select { font-size: 15px; }
.produkt-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.produkt-form .autocomplete { position: relative; }
.produkt-form .action-bar { margin-top: 2px; }
.abdeckung-einstellung { display: flex; flex-direction: column; gap: 6px; }
#r_abdeckung { margin-top: 6px; }
#btnProduktliste { margin-top: 8px; align-self: flex-start; }
.pl-eintraege { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; }
.pl-eintrag { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pl-eintrag:last-child { border-bottom: none; }
.pl-eintrag .info { min-width: 0; flex: 1; }
.pl-eintrag strong { display: block; font-size: 15px; }
.pl-eintrag small { color: var(--muted); font-size: 12.5px; }
.pl-gruppe {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); margin: 12px 2px 0; display: flex; align-items: center; gap: 6px;
}
.pl-gruppe svg.ic { width: 16px; height: 16px; }

/* Favoriten-Stern */
.stern-btn {
  flex: 0 0 auto; width: 36px; height: 36px; border: none; background: transparent;
  color: #b5b9c1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.stern-btn svg.ic { width: 20px; height: 20px; }
.stern-btn.aktiv { color: var(--orange); }
.stern-btn.aktiv svg.ic { fill: currentColor; }
.mit-stern { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mit-stern .zeile-text { flex: 1; min-width: 0; }
.ausgewaehlt-mit-stern { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

/* Diktat */
.diktat-karte > summary svg.ic, .ms-diktat svg.ic { width: 18px; height: 18px; }
.diktat-karte > summary > svg.ic {
  width: 32px; height: 32px; padding: 7px; border-radius: 10px;
  background: var(--orange-tint); color: var(--orange);
}
.diktat-karte textarea { min-height: 84px; }
.diktat-karte .action-bar { margin-top: 8px; }
.diktat-vorschau { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.diktat-liste { list-style: none; margin: 6px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.diktat-liste li { color: var(--green); }
.diktat-liste li.frei { color: var(--orange-ink); }
.diktat-liste small { display: block; color: var(--muted); font-size: 12px; margin-left: 16px; }
.diktat-unbekannt { color: var(--red); font-size: 13.5px; margin: 4px 0 8px; }
#tabDiktat textarea { min-height: 84px; }

/* Kombinationsprodukte */
.kombi-form .kf-titel { display: block; margin-bottom: 2px; }
.kombi-teil { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.kombi-teil .kt-name { width: 100%; margin-top: 4px; }
.kombi-teil .kt-nr { display: block; margin-top: 2px; }
.kombi-hinweis { margin: 2px 0 6px; font-size: 12.5px; }

/* Baustellen-Ordner */
#b_ordner select { width: 100%; }
.pf-ordner-wrap {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch;
  font-size: 13px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px;
  background: var(--orange-tint); border: none; color: var(--orange-ink);
}
.pf-ordner-wrap select { width: 100%; background-color: #fff; }
.db-ordner-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ordner-karte > summary > svg.ic {
  width: 32px; height: 32px; padding: 7px; border-radius: 10px;
  background: var(--blue-tint); color: var(--blue);
}
.db-verschieben { display: block; width: 100%; margin-top: 6px; font-size: 15px; }
.aufmass-ordner { margin-bottom: 10px; }
.aufmass-ordner select, #b_ordner select { width: 100%; }

/* Cloud-Sync */
.cloud-status {
  border: none; background: var(--field); border-radius: 12px; padding: 10px 14px;
  font-size: 13px; text-align: left; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.cloud-status.ok { color: var(--green); background: var(--green-tint); }
.cloud-status.wartet { color: var(--orange-ink); background: var(--orange-tint); }
.cloud-status.fehler { color: var(--red); background: var(--red-tint); white-space: normal; }

/* Materialdatenbank */
.db-kopf { display: flex; flex-direction: column; gap: 10px; }
.db-aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.db-aktionen .btn { flex: 1 1 auto; font-size: 14.5px; }
.db-info { padding: 0 2px; }
.db-kat-aktionen { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.db-kat-aktionen .btn-link-accent { flex: 1; }
.db-import-label { cursor: pointer; }
.db-filter { margin-top: 0; }
.doppelt-karte { padding: 12px 14px; }
.doppelt-karte .btn { margin-top: 8px; width: 100%; }

/* ---- 14. Einheitliche Materialsuche ---- */
.ms-kopf { display: flex; gap: 8px; align-items: stretch; }
.ms-kopf input { flex: 1; min-width: 0; }
#ms_diktatBtn.aktiv { background: var(--orange); color: #fff; }
.ms-diktat { margin-top: 8px; display: grid; gap: 8px; }
.ms-ergebnis { margin-top: 6px; }
.ms-gruppe {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); margin: 12px 2px 4px;
}
.ms-gruppe-det { margin-top: 6px; }
.ms-gruppe-det > summary.ms-gruppe {
  cursor: pointer; list-style: none; padding: 9px 2px; margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.ms-gruppe-det > summary.ms-gruppe svg.ic { width: 17px; height: 17px; color: var(--blue); }
.ms-gruppe-det > summary.ms-gruppe::-webkit-details-marker { display: none; }
.ms-liste { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.ms-zeile { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; flex-wrap: wrap; }
.ms-zeile + .ms-zeile { border-top: 1px solid var(--line); }
.ms-zeile:active { background: var(--field); }
.ms-zeile.katalog strong { font-weight: 500; }
.ms-text { flex: 1; min-width: 0; }
.ms-text strong { display: block; font-size: 15px; line-height: 1.3; }
.ms-text small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ms-plus {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: var(--orange-tint); color: var(--orange);
}
.ms-plus svg.ic { width: 18px; height: 18px; }
.ms-hinweis { padding: 4px 2px; margin: 0; }
.ms-frei {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
  border: 1.5px dashed #d9dbe0; border-radius: 14px; background: #fff; cursor: pointer; flex-wrap: wrap;
}
.ms-frei-text { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; }
.ms-frei select { width: auto; flex: none; }
.ms-ean { border-color: #f6c7b3; background: var(--orange-tint); }
.ms-zeile.offen, .ms-frei.offen { background: #fff8f5; }
.ms-menge {
  flex-basis: 100%; width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  display: grid; gap: 10px; cursor: default;
}
.ms-menge-zeile { display: flex; align-items: center; gap: 6px; }
.ms-menge-input { width: 90px !important; text-align: center; font-size: 17px !important; font-weight: 700 !important; }
.ms-menge .btn-qty { width: 44px; height: 44px; min-width: 44px; border-radius: 12px; background: var(--field); }
.ms-menge-einheit, .ms-menge-einheit-text { margin-left: 4px; }
.ms-menge-einheit { width: auto !important; }
.ms-menge-einheit-text { font-weight: 600; color: var(--muted); }
.ms-menge-aktionen { display: flex; align-items: center; gap: 12px; }
.ms-menge-ok { flex: 1; }
.ms-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px;
  padding: 10px 14px; border-radius: 12px; background: var(--green-tint); border: none;
  color: var(--green); font-size: 14px; font-weight: 600;
}
.ms-ok .btn-link-accent { white-space: nowrap; padding: 4px 0; }
.ms-snack {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 60;
  background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); display: grid; gap: 8px;
}
.ms-snack-text { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-snack-aktionen { display: flex; align-items: center; gap: 6px; }
.ms-snack .btn-qty { background: rgba(255, 255, 255, .14); color: #fff; border: none; width: 38px; height: 36px; border-radius: 10px; }
.ms-snack-menge { width: 70px !important; min-height: 36px !important; text-align: center; padding: 6px !important; }
.ms-snack-einheit { font-size: 13.5px; opacity: .85; margin-right: auto; }
.ms-snack-undo, .ms-snack-zu {
  background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff;
  border-radius: 10px; height: 36px; padding: 0 12px; margin-left: auto; font-family: inherit;
}
.ms-snack-zu { margin-left: 0; }

/* ---- 15. Mitarbeiter, Einstellungen, Kundenstamm ---- */
.einstellungen-karte { padding: 16px; display: grid; gap: 12px; }
.einstellungen-karte > strong { font-size: 16.5px; }
.einstellungen-karte input { width: 100%; }
.k-ergebnis { border: none; background: var(--green-tint); border-radius: 12px; padding: 12px 14px; }
.k-ergebnis p { margin: 0 0 6px; }
.k-beispiel { font-size: 12px; white-space: pre-wrap; margin: 0 0 8px; color: var(--muted); }
.einstellungen-karte code { font-size: .85em; }

.ks-liste li.ks-neu { color: var(--orange-ink); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ks-liste li.ks-neu svg.ic { width: 17px; height: 17px; }
.ks-verwaltung .ks-suche { width: 100%; margin-bottom: 8px; }
.ks-verwaltung .card-list { margin: 0; gap: 0; }
.ks-zeile { display: flex; align-items: center; gap: 6px; padding: 10px 2px; border-bottom: 1px solid var(--line); list-style: none; }
.ks-zeile:last-child { border-bottom: none; }
.ks-zeile .info { flex: 1; min-width: 0; }
.ks-zeile .info p { margin: 0; overflow-wrap: anywhere; }
.ks-zeile .kunde { font-weight: 700; font-size: 15px; }
.ks-zeile .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ks-zeile input { width: 100%; }
.ks-zeile:has(.ks-n) { flex-direction: column; align-items: stretch; gap: 8px; }
.ks-knoepfe { display: flex; gap: 8px; }
.ks-knoepfe .btn { flex: 1; }
.ks-fehler { color: var(--red); }
.zaehler-label { flex: 1; min-width: 0; }
.zaehler-zeile .menge-control { flex: 0 0 auto; }
/* Mengen in Tabellen kompakter (schmale iPhone-Breite) */
td.col-menge { min-width: 112px; }
td .menge-control .btn-qty { width: 32px; min-width: 32px; height: 36px; }
td .menge-control input:not([type=checkbox]) { width: 44px; }
.btn-outline-neutral { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
th, td { padding-left: 4px; padding-right: 4px; }
td.col-menge { min-width: 104px; }
td .menge-control .btn-qty { width: 30px; min-width: 30px; }
td .menge-control input { width: 40px !important; padding: 4px 0 !important; }
.menge-add { flex-wrap: wrap; gap: 4px; }
.menge-add input { width: 52px !important; }
.btn-qty-add { padding: 7px 8px; }
td.col-del .btn-danger-text { width: 32px; height: 32px; }

/* ---- 16. Standort-Funktionen (v7.2): Ergänzungen zu speckmann-standort.css ---- */
.cust-wrap { position: relative; }
.near-btn { min-height: 48px; }
.field-grid > .loc-btn { justify-self: start; margin-top: -4px; }
/* Vorschlagsliste „Kunde in der Nähe“ (Klassen aus der Design-Vorlage) */
.suggest {
  position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 30px rgba(20, 22, 28, .16); z-index: 20; max-height: 300px; overflow-y: auto; display: none;
}
.suggest.show { display: block; }
.suggest-item { padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.suggest-item:last-child { border-bottom: none; }
.suggest-item:active { background: var(--field); }
.suggest-item .s-name { font-size: 15px; font-weight: 600; color: var(--text); }
.suggest-item .s-addr { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }
/* Hinweis-Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + var(--safe-bottom)); transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500;
  z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  max-width: 90%; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 17. Barcode-Scanner (v7.3/v7.4): Kamerabild bleibt im Fenster, Taschenlampe ---- */
#scannerReader { position: relative; }
#scannerReader > div { position: relative; width: 100%; }
#scannerReader video { position: static !important; display: block; }
.scanner-licht {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px auto 0; align-self: center;
  border: none; border-radius: 22px; padding: 10px 18px; font: inherit; font-size: 15px; font-weight: 700;
  background: var(--field); color: var(--text); cursor: pointer;
}
.scanner-licht svg.ic { width: 19px; height: 19px; }
.scanner-licht.aktiv { background: #ffd84d; color: #3a2f00; }
.chip.chip-aktiv { background: var(--ink); color: #fff; }
.scanner-einstellung .sk-laden { margin-top: 6px; }

/* ---------- Bulli (v7.6) ---------- */
.bulli-schalter {
  display: flex; flex-direction: row; align-items: center; gap: 12px; margin: 0 0 12px;
  padding: 10px 12px; border-radius: 12px; background: var(--orange-tint); cursor: pointer;
}
.bulli-schalter input[type=checkbox] { flex: 0 0 auto; margin-top: 2px; width: 22px; height: 22px; }
.bulli-schalter-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bulli-schalter-text strong { display: flex; align-items: center; gap: 6px; color: var(--orange-ink); font-size: 15px; }
.bulli-schalter-text strong svg.ic { width: 18px; height: 18px; }
.bulli-schalter-text small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.bulli-btn {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 34px; height: 34px; margin-right: 2px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: #b5b8bf; cursor: pointer; padding: 0;
}
.bulli-btn svg.ic { width: 18px; height: 18px; }
.bulli-btn.aktiv { background: var(--orange); border-color: var(--orange); color: #fff; }
.bulli-karte { gap: 12px; border: 1.5px solid var(--orange-tint); }
.bulli-karte > .ht { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.bulli-hinweis { display: flex; gap: 8px; align-items: flex-start; }
.bulli-hinweis svg.ic { flex: 0 0 18px; width: 18px; height: 18px; color: var(--orange); margin-top: 1px; }
td.bulli-menge { font-weight: 700; white-space: nowrap; }
#btnBulliLeeren { margin-top: 10px; }

/* v7.8: Bulli/Löschen unter der Menge in der Aufmaß-Materialliste */
#materialTabelle { table-layout: fixed; }
#materialTabelle th:nth-child(1), #materialTabelle td:nth-child(1) { width: auto; overflow-wrap: anywhere; hyphens: auto; }
#materialTabelle th:nth-child(2), #materialTabelle td:nth-child(2) { width: 140px; min-width: 0; }
#materialTabelle .menge-control .btn-qty { width: 30px; min-width: 30px; }
#materialTabelle .menge-control input:not([type=checkbox]) { width: 62px !important; padding: 4px 2px !important; }
#materialTabelle .btn-qty-add { padding-left: 8px; padding-right: 8px; }
#materialTabelle th:nth-child(3), #materialTabelle td:nth-child(3) { width: 44px; overflow-wrap: anywhere; }
#materialTabelle .menge-add input:not([type=checkbox]) { width: 52px; }
#materialTabelle .menge-add { flex-wrap: wrap; }
.zeile-aktionen { display: flex; gap: 8px; margin-top: 6px; }
.zeile-aktionen .bulli-btn { margin: 0; }
.zeile-aktionen .btn-danger-text { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }

/* v7.10: Freitext in der Packliste */
.pl-frei { display: flex; flex-direction: column; gap: 8px; }
.pl-frei-zeile { display: flex; gap: 8px; align-items: center; }
.pl-frei-zeile #p_freiMenge { width: 72px !important; flex: 0 0 72px; text-align: center; }
.pl-frei-zeile #p_freiEinheit { width: auto; flex: 0 0 auto; }
.pl-frei-zeile .btn { flex: 1; }
.pl-frei-oder { margin: 14px 0 6px; }

/* v7.12: Kundenfeld + Baustellen wie Stundenzettel-App */
.kunde-grid .site-row, .kunde-grid .site-form, .kunde-grid .kunde-adresse { grid-column: 1 / -1; }
.quickbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.site-row { margin-top: -4px; align-items: center; }
.qbtn { border: none; border-radius: 20px; background: var(--field); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; cursor: pointer; }
.qbtn:active { filter: brightness(.95); }
.qbtn.active { background: var(--ink); color: #fff; }
.qbtn.site-add { display: inline-flex; align-items: center; gap: 4px; background: var(--orange-tint); color: var(--orange-ink); }
.qbtn.site-add svg.ic { width: 16px; height: 16px; }
.site-info { flex-basis: 100%; display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.site-info > svg.ic { flex: 0 0 15px; width: 15px; height: 15px; color: var(--orange); margin-top: 1px; }
.site-info span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.site-weg { border: none; background: none; color: var(--muted); padding: 0 2px; cursor: pointer; }
.site-weg svg.ic { width: 16px; height: 16px; }
.site-form { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 14px; background: var(--orange-tint); }
.site-form[hidden], .kunde-adresse[hidden], .site-row[hidden] { display: none !important; }
.site-form-title { font-size: 14px; font-weight: 700; color: var(--orange-ink); }
.site-form input, .site-form textarea { background-color: #fff; }
.site-form .loc-btn { align-self: flex-start; margin-top: -4px; }
.site-form-knoepfe { display: flex; gap: 8px; }
.site-form-knoepfe .btn { flex: 1; margin-top: 0; }
.kunde-adresse { display: flex; flex-direction: column; gap: 8px; }
.kunde-adresse .loc-btn { align-self: flex-start; margin-top: 0; }
.s-site { display: inline-block; font-size: 12px; font-weight: 700; color: var(--orange-ink); background: var(--orange-tint); border-radius: 20px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }

/* v7.13: Arbeitszeit im Aufmaß */
.az-schalter { display: flex !important; flex-direction: row !important; justify-content: flex-start; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--text); text-align: left; margin: 4px 0 10px; }
.az-schalter input { width: 20px !important; height: 20px; flex: none; accent-color: var(--blue); }
.az-aus { opacity: .45; }
.az-titel { margin: 12px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.az-liste { list-style: none; margin: 0; padding: 0; }
.az-liste li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line, #e6e8ec); font-size: 14px; }
.az-liste .az-datum { font-variant-numeric: tabular-nums; }
.az-liste .az-text { color: var(--muted); overflow-wrap: anywhere; }
.az-liste .az-std { font-weight: 600; white-space: nowrap; }
.az-zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 8.5em) minmax(0, 4.5em) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.az-zeile input { min-width: 0; }
.az-nr-btn { margin: 4px 0 8px; }
.az-summe { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line, #e6e8ec); text-align: right; }
@media (max-width: 420px) {
  .az-zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 4.5em) auto; }
  .az-zeile .az-dat { grid-column: 1 / -1; grid-row: 2; }
}

/* v7.14: Hinweis „Aufmaße mit Nummer noch nicht gesendet“ (Startseite) */
.nr-offen-hinweis {
  background: var(--orange-tint); border-radius: var(--radius); margin-bottom: 12px;
  border: 1px solid rgba(239, 90, 36, .25);
}
.nr-offen-hinweis > summary {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none;
}
.nr-offen-hinweis > summary::-webkit-details-marker { display: none; }
.nr-offen-hinweis > summary .ht { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #fff; }
.nr-offen-hinweis > summary > span:last-child { display: flex; flex-direction: column; min-width: 0; color: var(--orange-ink); }
.nr-offen-hinweis > summary small { font-size: 12.5px; opacity: .8; }
.nr-offen-hinweis[open] > summary small { display: none; }
.nr-offen-hinweis ul { list-style: none; margin: 0; padding: 0 10px 10px; }
.nr-offen-hinweis li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: var(--card); border-radius: 10px; padding: 10px 12px; margin-top: 6px; cursor: pointer;
}
.nr-offen-hinweis li .nr { font-weight: 700; white-space: nowrap; }
.nr-offen-hinweis li .kd { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-offen-hinweis li .chevron svg.ic { width: 16px; height: 16px; color: var(--muted); }
.nr-offen-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 20px;
  background: var(--orange-tint); color: var(--orange-ink);
  font-size: 11.5px; font-weight: 700; vertical-align: middle; white-space: nowrap;
}
