:root {
  /* Standard: dunkles Erscheinungsbild („dunkle Seite der Macht“) */
  color-scheme: dark;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --header-h: 64px;
  --radius: 14px;

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 140ms;
  --t: 200ms;

  /* Elevation (Dark) */
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.55);

  /* Dark theme (default) */
  --bg: #070B14;
  --bg2: #0B1630;
  --card: rgba(14, 26, 45, 0.78);
  --surface: rgba(15, 27, 46, 0.68);
  --text: #E5E7EB;
  --muted: #94A3B8;
  --border: rgba(148, 163, 184, 0.18);

  --primary: #60A5FA;
  --primary-dark: #3B82F6;
  --primary-soft: rgba(96, 165, 250, 0.16);
  --secondary: #3B82F6;

  --cta: #FB923C;
  --cta-dark: #F97316;

  --green: #22C55E;
  --yellow: #FBBF24;
  --red: #F87171;
  --gray: #9CA3AF;

  --control-bg: rgba(15, 27, 46, 0.72);
  --control-fg: var(--text);
  --focus: rgba(96, 165, 250, 0.48);

  /* Nur Markenwort „MARINGER“ (ARGB 0xFFE2001A → #E2001A) */
  --brand-maringer: #E2001A;

  /* Karten-Hauptseite: undurchsichtig (keine Karte durchscheinen lassen) */
  --map-chrome-solid: var(--bg2);
  --map-btn-idle: color-mix(in oklab, var(--primary) 24%, var(--bg2));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}

button, a, input, select, textarea, label[for], [role="button"] {
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.hidden { display: none !important; }

:root body {
  background:
    radial-gradient(1200px 600px at 20% -10%, color-mix(in oklab, var(--primary-soft) 70%, transparent), transparent 60%),
    radial-gradient(900px 540px at 100% 0%, color-mix(in oklab, var(--bg2) 60%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg));
}

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

.screen {
  position: fixed;
  inset: 0;
}

.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: min(380px, 100%);
  background: var(--card);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: var(--text);
}

.login-card h1 .logo-sub {
  font-weight: 400;
}

.login-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.login-card input,
.login-card button,
.map-topbar input,
.article-search-wrap input,
.cart-row input,
.cart-row select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  background: var(--control-bg);
  color: var(--control-fg);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

input::placeholder, textarea::placeholder { color: color-mix(in oklab, var(--muted) 88%, var(--text)); }
input:focus, textarea:focus, select:focus {
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--focus) 65%, transparent);
}
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }

.login-card button,
.cart-btn,
#visit-btn,
#send-order-btn,
.article-add-btn,
.sub-header button,
.search-result,
#gps-btn,
#catalog-load-btn {
  cursor: pointer;
}

.login-card button,
#send-order-btn,
#visit-btn,
#catalog-load-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.login-card button {
  margin-top: 12px;
  background: var(--cta);
  border-radius: 8px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.login-card button:hover,
.login-card button:active {
  background: var(--cta-dark);
}
.login-card button:active { transform: translateY(1px); }

.error-text {
  margin-top: 10px;
  color: var(--red);
  font-size: 14px;
  min-height: 18px;
}

.app-shell {
  position: fixed;
  inset: 0;
}

/* Kunde / Warenkorb: kein fixierter App-Header — Kopfzeile + Inhalt scrollen gemeinsam */
.app-shell.app-shell--scroll {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.app-shell.app-shell--scroll .header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  flex-shrink: 0;
}

.app-shell.app-shell--scroll .screen.app-screen {
  position: relative;
  inset: auto;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  overflow: visible;
  flex: 0 0 auto;
  min-height: 0;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 16px;
  background: color-mix(in oklab, var(--card) 86%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(14px);
}

.logo {
  font-size: 22px;
  font-weight: 800;
}

.logo-brand {
  color: var(--brand-maringer);
}

.logo-sub {
  color: var(--text);
  font-weight: 400;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.cart-btn:active { transform: translateY(1px); }

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--primary);
  font-size: 13px;
}

.app-screen {
  top: var(--header-h);
  overflow-y: auto;
  background: var(--bg);
}

/* ── 2026 Layout: vollflächig + gekachelt ─────────────────────────────── */
.page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 12px 14px;
}

.customer-layout {
  display: grid;
  gap: 12px;
}

.customer-aside,
.customer-content {
  min-width: 0;
}

.customer-tab-bar {
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.customer-tab-bar::-webkit-scrollbar {
  display: none;
}

.customer-tab-panel {
  padding-bottom: 24px;
}

.tab-offers-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.tab-offers-placeholder-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.tab-offers-placeholder-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.tab-offers-placeholder-sub {
  font-size: 14px;
  color: var(--muted);
}

.panel-column-head {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.tab-panel {
  min-width: 0;
}

/* ── Tab-Bar ──────────────────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.tab-btn {
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-size: 14px;
  transition: color var(--t-fast) var(--ease), border-bottom-color var(--t-fast) var(--ease);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.cart-layout {
  display: grid;
  gap: 12px;
}

@media (min-width: 980px) {
  .customer-layout {
    grid-template-columns: 360px minmax(0, 1fr);
    align-items: start;
  }
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
  }
}

/* In der gekachelten Page sollen Cards ohne Außen-Margin laufen */
.page .customer-header,
.page .hint-box,
.page .cart-customer-box,
.page .cart-footer,
.page .stats-row,
.page .section-block,
.page .info-card,
.page .customer-split,
.page .article-card,
.page .contact-card,
.page .report-card {
  margin-left: 0;
  margin-right: 0;
}

.page .section-header,
.page .section-header-row {
  margin-left: 0;
  margin-right: 0;
}

/* Besuchshistorie: links unter Kundenkopf */
.customer-aside .aside-visit-history-title {
  margin-top: 4px;
  margin-bottom: 8px;
}

.customer-aside .visit-history-card {
  margin-top: 0;
}

.page .article-search-wrap,
.page .cart-items {
  padding-left: 0;
  padding-right: 0;
}

.page .article-card,
.page .report-card,
.page .contact-card {
  margin-left: 0;
  margin-right: 0;
}

/* Desktop: rechte Spalte soll “eingerastet” wirken */
@media (min-width: 980px) {
  .cart-right .cart-footer {
    position: sticky;
    top: 10px;
  }
}

#map-screen {
  display: flex;
  flex-direction: column;
  overflow: clip;
}

.map-topbar {
  position: relative;
  z-index: 900;
  display: flex;
  gap: 6px;
  padding: 4px 8px;
  height: 52px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-items: center;
}

#gps-btn {
  width: 44px;
  min-width: 44px;
  border: none;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

#filter-btn,
#tour-btn {
  background: var(--primary-soft);
  color: var(--primary);
  border: none;
  border-radius: 8px;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

#filter-btn:hover,
#filter-btn:active,
#tour-btn:hover,
#tour-btn:active,
#gps-btn:hover,
#gps-btn:active {
  background: var(--primary);
  color: #fff;
}
#filter-btn:active, #tour-btn:active, #gps-btn:active { transform: translateY(1px); }

#search-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 950;
  background: var(--map-chrome-solid);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 280px;
  overflow-y: auto;
}

.search-result {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.search-result-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.search-result-sub {
  color: var(--muted);
  font-size: 14px;
}

#map {
  flex: 1;
  min-height: 0;
}

.sub-header {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.sub-header button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
}

#visit-btn {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  transition: background var(--t-fast) var(--ease);
}

.customer-header,
.hint-box,
.cart-customer-box,
.cart-footer,
.stats-row,
.section-block {
  margin: 12px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.customer-header {
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.customer-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.customer-address {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.visit-pill {
  border-radius: 20px;
  padding: 4px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.visit-green { background: var(--green); }
.visit-yellow { background: var(--yellow); }
.visit-red { background: var(--red); }
.visit-none { background: var(--gray); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
}

.stat-card {
  padding: 16px 10px;
  text-align: center;
  border-right: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
}

.stat-card:last-child { border-right: none; }

.stat-value {
  display: block;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 6px;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.hint-box {
  padding: 16px;
}

.hint-title,
.section-header,
.field-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hint-text {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.section-header {
  margin: 18px 12px 8px;
}

.article-search-wrap {
  padding: 8px 12px 12px;
  background: color-mix(in oklab, var(--cta) 8%, var(--bg2));
  border-top: 2px solid color-mix(in oklab, var(--cta) 55%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--cta) 22%, transparent);
  margin-bottom: 4px;
}

.article-search-wrap input {
  border-color: color-mix(in oklab, var(--cta) 45%, var(--border)) !important;
  background: color-mix(in oklab, var(--cta) 6%, var(--control-bg)) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
}

.article-search-wrap input:focus {
  border-color: var(--cta) !important;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--cta) 28%, transparent) !important;
}

.tab-panel-order .section-header {
  color: var(--cta);
}

#manual-article-section {
  margin: 0 12px 12px;
}

.manual-article-toggle {
  width: 100%;
  padding: 12px 16px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.manual-article-toggle:active {
  background: var(--bg);
}

#manual-article-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
}

.manual-article-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manual-article-fields input[type="text"],
.manual-article-fields input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--bg);
}

.article-card {
  background: var(--card);
  margin: 0 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.article-card.history {
  border-left: 6px solid var(--primary);
}

.article-body {
  padding: 16px;
}

.article-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.article-title {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 4px;
}

.article-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.article-controls {
  display: grid;
  grid-template-columns: 1fr 110px 140px;
  gap: 10px;
  padding: 0 16px 16px;
}

.article-controls select,
.article-controls input {
  min-height: 52px;
}

.article-add-btn {
  border: 1px solid var(--primary);
  background: var(--control-bg);
  color: var(--primary);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.article-add-btn:hover { background: var(--primary-soft); border-color: color-mix(in oklab, var(--primary) 65%, var(--border)); }
.article-add-btn:active { transform: translateY(1px); }

.cart-items {
  padding: 0 12px 12px;
}

.cart-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.cart-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.cart-row-number {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-row-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.cart-row-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.remove-btn {
  min-width: 44px;
  height: 44px;
  border: 1px solid #f1b0b7;
  border-radius: 12px;
  background: #fff5f6;
  color: var(--red);
  font-size: 18px;
  font-weight: 800;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.remove-btn:active { transform: translateY(1px); }

.cart-grid {
  display: grid;
  grid-template-columns: 110px 120px;
  gap: 10px;
  margin-bottom: 10px;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.cart-footer {
  padding: 16px;
}

/* Besteller: großes Select (Touch / Handy) */
.besteller-field {
  margin-top: 4px;
  margin-bottom: 4px;
}

.cart-footer #order-besteller-label,
.besteller-field .field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

#order-besteller,
.besteller-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px; /* verhindert Auto-Zoom auf iOS */
  font-weight: 600;
  line-height: 1.35;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background-color: var(--control-bg);
  color: var(--control-fg);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#order-besteller:focus,
.besteller-select:focus {
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--focus) 65%, transparent);
  outline: none;
}

@media (max-width: 480px) {
  #order-besteller,
  .besteller-select {
    min-height: 56px;
    padding: 16px 18px;
    font-size: 17px;
  }
}

.cart-footer .field-label[for="order-note"] {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
}

.bestpflicht-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.bestpflicht-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.bestpflicht-label {
  font-size: 13px;
  color: var(--text);
}

.besteller-warning {
  font-size: 13px;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 4px;
}

.doc-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.doc-type-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

#doc-type-bestellung.doc-type-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

#doc-type-angebot.doc-type-active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

#send-order-btn.angebot-mode {
  background: var(--red);
}

#send-order-btn {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border-radius: 14px;
  font-size: 17px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

#send-order-btn:hover,
#send-order-btn:active {
  background: var(--primary-dark);
}

#clear-cart-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  z-index: 5000;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #ececec;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--text);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 6000;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show { opacity: 1; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

.gps-dot {
  width: 18px;
  height: 18px;
  background: #4285f4;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(66,133,244,0.3), 0 2px 6px rgba(0,0,0,0.3);
}

.gps-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  background: rgba(66,133,244,0.15);
  border-radius: 50%;
  animation: gps-pulse 2s ease-out infinite;
}

@keyframes gps-pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.pin-shell {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 14px 14px 14px 2px;
  transform: rotate(-45deg);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.pin-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.pin-green { background: var(--green); }
.pin-yellow { background: var(--yellow); }
.pin-red { background: var(--red); }
.pin-none { background: var(--gray); }

.popup-box {
  padding: 12px;
  min-width: 230px;
}

.popup-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.popup-sub {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.popup-open-btn {
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

/* Leaflet-Popup: dunkles Theme + gleiche Schriftfarben wie die App */
.leaflet-popup-content-wrapper {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-popup-tip {
  background: var(--card) !important;
  border: 1px solid var(--border);
  box-shadow: none !important;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  color: var(--text) !important;
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--text) !important;
}

@media (max-width: 640px) {
  .logo { font-size: 18px; }
  .cart-btn { font-size: 14px; padding: 10px 12px; }
  .customer-name { font-size: 21px; }
}

@media (max-width: 480px) {
  .article-controls {
    grid-template-columns: 1fr 1fr;
  }
  .article-add-btn {
    grid-column: 1 / -1;
  }
}


.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--control-bg);
  cursor: pointer;
  padding: 0;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 12px;
  border-top: 1px solid var(--border);
}

.header-menu.hidden {
  display: none !important;
}

.header-btn,
.user-chip {
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.header-btn {
  cursor: pointer;
  font-weight: 700;
}

.user-chip {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 3000;
}

.modal-card {
  width: min(900px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--control-bg);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
}

.session-list {
  display: grid;
  gap: 12px;
}

.session-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--control-bg);
}

.session-row-main {
  min-width: 0;
  flex: 1;
}

.session-user {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.session-role {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-left: 6px;
}

.session-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  word-break: break-word;
}

.session-kill-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: 170px;
}

.session-empty {
  color: var(--muted);
  padding: 12px 4px;
}

/* ── Info cards ───────────────────────────────────────────────────────── */

.info-card {
  margin: 8px 12px 0;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Form rows (Portatour-Stil: Label links, Input rechts) */
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
}

.form-row-last {
  border-bottom: none;
}

/* Datum: volle Zeilenbreite — sonst schneiden manche Browser „Mo., …“ ab und nur „,25.03.2026“ bleibt. */
.form-row-date {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;
}

.form-row-date .form-row-label {
  flex: 0 0 100%;
  max-width: none;
  padding-top: 4px;
}

.form-row-date .visit-date-field {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.form-row-label {
  min-width: 110px;
  max-width: 110px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.form-row input,
.form-row textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  padding: 12px 0;
  outline: none;
  min-width: 0;
}

.form-row textarea {
  resize: none;
  padding: 10px 0;
  line-height: 1.4;
}

.form-row-inline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.form-row-inline input {
  flex: 1;
  min-width: 0;
}

.form-row-unit {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.info-save-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 12px 16px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}

.info-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
}
.info-link:active { opacity: 0.7; }
.info-muted {
  color: var(--muted);
  font-size: 14px;
}

/* ── Section header with button ──────────────────────────────────────── */

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 12px 6px;
}

.section-header-row .section-header {
  margin: 0;
}

.section-add-btn,
.new-report-btn {
  border: 1px solid var(--primary);
  background: var(--control-bg);
  color: var(--primary);
  border-radius: 10px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.contact-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.section-scan-btn {
  background: var(--control-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.card-scan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
}

.card-scan-overlay.hidden {
  display: none;
}

.card-scan-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: card-spin 0.8s linear infinite;
}

@keyframes card-spin {
  to { transform: rotate(360deg); }
}

.card-scan-text {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* ── Contact cards ───────────────────────────────────────────────────── */

.contact-empty {
  margin: 6px 12px 0;
  color: var(--muted);
  font-size: 14px;
  padding: 12px 4px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 12px 0;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 14px;
}

.contact-card-body {
  flex: 1;
  min-width: 0;
}

.contact-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.contact-card-role {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.contact-card-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.contact-card-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-action-btn {
  border: 1px solid var(--border);
  background: var(--control-bg);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── New report form ─────────────────────────────────────────────────── */

#new-report-form {
  gap: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

#new-report-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  background: var(--bg);
  resize: none;
  min-height: 110px;
}

.photo-upload-label {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--control-bg);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

.photo-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-photo-preview-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-form-btns {
  display: flex;
  gap: 10px;
}

.info-form-btns button {
  flex: 1;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--control-bg);
  color: var(--text);
}

.info-form-btns button:last-child {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ── Reports list ────────────────────────────────────────────────────── */

#reports-list {
  padding-bottom: 24px;
}

.report-empty {
  margin: 12px 12px 0;
  color: var(--muted);
  font-size: 15px;
  padding: 16px;
}

.report-card {
  margin: 12px 12px 0;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  overflow: hidden;
}

.report-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 14px 0;
}

.report-card-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.report-card-author {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.report-card-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.report-delete-btn,
.report-edit-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  color: var(--muted);
  line-height: 1;
}

.report-edited-note {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 6px;
}

.report-empty-text {
  color: var(--muted);
  font-style: italic;
}

.report-card-text {
  padding: 10px 14px 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text);
}

.report-card-edit-form {
  padding: 8px 14px 12px;
}

.report-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg, #111);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
}

.report-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.report-save-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.report-save-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.report-cancel-edit-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.report-card-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
}

.report-photo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 900px) {
  .session-row {
    align-items: stretch;
    flex-direction: column;
  }

  .session-kill-btn {
    width: 100%;
    min-width: 0;
  }
}

/* ── Tourenplanung ──────────────────────────────────────────────────────────── */

#tour-btn {
  font-size: 18px;
  padding: 0 10px;
  background: var(--map-btn-idle);
  border: none;
  cursor: pointer;
}

#tour-btn, #filter-btn, #gps-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tour-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  z-index: 950;
  max-height: 52vh;
  display: flex;
  flex-direction: column;
}

.tour-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tour-drawer-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.tour-drawer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tour-drawer-actions button {
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--primary);
  color: #fff;
}

.tour-close-btn {
  background: var(--bg) !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  padding: 7px 10px !important;
}

.tour-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}

.tour-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.tour-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s;
}

.tour-item-visited {
  opacity: 0.45;
}

.tour-item-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tour-item-num.visited {
  background: var(--green);
}

.tour-item-info {
  flex: 1;
  min-width: 0;
}

.tour-item-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-item-addr {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-item-prio {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.prio-A { color: var(--red); }
.prio-B { color: var(--yellow); }
.prio-C { color: var(--gray); }

.tour-visit-btn {
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t-fast) var(--ease);
}

.tour-visit-btn.visited {
  background: var(--green);
  cursor: default;
}

/* Tour-Map-Pins */
.tour-pin {
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  color: #fff;
  font-weight: 800;
}

.tour-pin span {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.tour-pin.visited {
  background: var(--green);
}

.tour-maps-btn {
  background: #1a73e8 !important;
}

.tour-maps-btn:disabled {
  background: var(--border) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
}

#navigate-btn {
  font-size: 18px;
  padding: 0 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

/* ── Besuchshistorie ────────────────────────────────────────────────────────── */

.visit-history-card {
  padding: 0;
}

.visit-history-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}

.visit-history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.visit-history-row:last-child {
  border-bottom: none;
}

.visit-history-label {
  font-size: 13px;
  color: var(--muted);
}

.visit-history-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  text-align: right;
}

/* ── Karten-Filter ─────────────────────────────────────────────────────────── */

#filter-btn {
  font-size: 16px;
  padding: 0 10px;
  background: var(--map-btn-idle);
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.filter-btn-active {
  color: var(--primary) !important;
}

.no-coords-list {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 45vh;
  overflow-y: auto;
  background: var(--map-chrome-solid);
  border-top: 1px solid var(--border);
  z-index: 950;
}
.no-coords-header {
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.no-coords-row {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.no-coords-row:active { background: var(--bg); }
.no-coords-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.no-coords-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.filter-panel {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  background: var(--map-chrome-solid);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px 8px;
  z-index: 940;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 52px;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-select {
  flex: 1;
  font-size: 13px;
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.filter-chip {
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip-red.active  { background: var(--red);    border-color: var(--red); }
.chip-yellow.active { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.chip-green.active  { background: var(--green);  border-color: var(--green); }
.chip-gray.active   { background: var(--gray);   border-color: var(--gray); }

.filter-count-row {
  font-size: 11px;
  color: var(--muted);
  min-height: 14px;
}

/* ── Herold-Banner ───────────────────────────────────────────────────────── */

.herold-banner {
  margin: 0 16px;
  padding: 12px 16px;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.herold-banner-text {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.herold-convert-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  transition: background var(--t-fast) var(--ease);
}

.herold-convert-btn:hover,
.herold-convert-btn:active {
  background: var(--primary-dark);
}

.pin-herold {
  width: 28px;
  height: 28px;
  background: #6b7280;
  border: 2px solid #374151;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}
.pin-herold .pin-inner {
  transform: rotate(-45deg);
  color: white;
  font-weight: 700;
  font-size: 10px;
}

[data-lucide] {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  vertical-align: middle;
  display: inline-block;
}

.cart-btn [data-lucide] {
  width: 22px;
  height: 22px;
}

.photo-upload-label [data-lucide] {
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

/* ── User Wunsch: eckigeres UI + volle Breite ─────────────────────────── */
:root {
  --radius: 8px;
}

/* Kacheln/Controls eckiger */
.login-card,
.customer-header,
.hint-box,
.cart-customer-box,
.cart-footer,
.stats-row,
.section-block,
.article-card,
.cart-row,
.info-card,
.contact-card,
.report-card,
.panel-column-head,
.modal-card,
.filter-panel {
  border-radius: 8px !important;
}

/* Tour-Drawer: obere Ecken abgerundet, untere spitz */
.tour-drawer {
  border-radius: 8px 8px 0 0 !important;
}

.login-card input,
.login-card button,
.map-topbar input,
.article-search-wrap input,
.cart-row input,
.cart-row select,
textarea,
.sub-header button,
.header-btn,
.user-chip,
.hamburger-btn,
.article-add-btn,
.doc-type-btn,
#send-order-btn,
#clear-cart-btn,
#visit-btn,
#filter-btn,
#tour-btn,
#gps-btn,
.info-form-btns button,
.section-add-btn,
.new-report-btn,
.photo-upload-label,
.contact-action-btn,
.modal-close,
.tour-drawer-actions button {
  border-radius: 6px !important;
}

/* Runde Elemente beibehalten */
.cart-count,
.tour-item-num,
.gps-dot,
.gps-pulse {
  border-radius: 999px !important;
}

/* Fix: Besuchs-Badge darf nicht in Nachbar-Kachel überlaufen */
.customer-header {
  flex-wrap: wrap;
}

.customer-header > div:first-child {
  min-width: 0;
  flex: 1 1 220px;
}

.customer-header .visit-pill {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
