/* ============================================================
   LALE FRUCHTIMPORT CRM — Stylesheet
   Farben: Waldgrün #1A3A2A · Creme #F5F1E8 · Mandarine #D9883B · Sand #CBB99E
   ============================================================ */

:root {
  --gruen:      #1A3A2A;
  --gruen-l:    #2a5a42;
  --waldgruen:  #1A3A2A;   /* Alias für LKW-Widget – identisch mit --gruen */
  --creme:      #F5F1E8;
  --mand:       #D9883B;
  --mandarine:  #D9883B;   /* Alias – wird in .btn-lkw verwendet */
  --mand-l:     #e8a05a;
  --sand:       #CBB99E;
  --sand-l:     #e8ddd0;
  --rot:        #c0392b;
  --grau:       #6b7280;
  --grau-l:     #f3f4f6;
  --weiss:      #ffffff;
  --schatten:   0 2px 8px rgba(26,58,42,0.10);
  --radius:     10px;
  --font:       'Raleway', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--creme);
  color: var(--gruen);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gruen); text-decoration: none; }
a:hover { color: var(--mand); }

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  background: var(--gruen);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  min-height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--creme);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--mand); }

.nav-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.nav-title { color: var(--creme); }
.nav-sub   { color: var(--mand); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  color: rgba(245,241,232,0.8);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.12);
  color: var(--creme);
}
.nav-link.active { color: var(--mand); }

.nav-btn {
  background: var(--mand);
  color: var(--weiss);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-left: 0.5rem;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-btn:hover { background: var(--mand-l); color: var(--weiss); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--creme);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── MAIN ───────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

/* ── FLASH ──────────────────────────────────────────────── */
.flash-container { margin-bottom: 1rem; }
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--rot); }
.flash-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }
.flash-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--mand); }

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gruen);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.page-sub {
  color: var(--grau);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.back-link {
  font-size: 0.85rem;
  color: var(--grau);
  display: block;
  margin-bottom: 0.25rem;
}
.back-link:hover { color: var(--mand); }
.header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--schatten);
  margin-bottom: 1.25rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gruen);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.card-alert  { border-left: 4px solid var(--mand); }
.card-success{ border-left: 4px solid #10b981; }
.card-action { border-left: 4px solid var(--gruen); background: #f0f7f3; }
.card-activity { background: #f8fdf9; border-left: 4px solid var(--gruen-l); }
.card-whatsapp { background: #f0fdf4; border-left: 4px solid #25d366; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--gruen); color: var(--weiss); }
.btn-primary:hover { background: var(--gruen-l); color: var(--weiss); }
.btn-secondary { background: var(--sand-l); color: var(--gruen); border: 1px solid var(--sand); }
.btn-secondary:hover { background: var(--sand); }
.btn-ghost     { background: transparent; color: var(--grau); border: 1px solid var(--grau); }
.btn-ghost:hover { background: var(--grau-l); }
.btn-call      { background: var(--mand); color: var(--weiss); }
.btn-call:hover { background: var(--mand-l); color: var(--weiss); }
.btn-whatsapp  { background: #25d366; color: var(--weiss); }
.btn-whatsapp:hover { background: #1da851; color: var(--weiss); }
.btn-success   { background: #10b981; color: var(--weiss); }
.btn-danger    { background: var(--rot); color: var(--weiss); }
.btn-lg        { padding: 0.65rem 1.5rem; font-size: 1rem; }
.btn-xs        { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.btn-full      { width: 100%; justify-content: center; }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-orange { background: var(--mand); color: var(--weiss); }
.badge-red    { background: var(--rot); color: var(--weiss); }
.badge-green  { background: #10b981; color: var(--weiss); }
.badge-gray   { background: var(--grau); color: var(--weiss); }

/* ── PRIO BADGES ────────────────────────────────────────── */
.prio-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.prio-p1 { background: var(--mand); color: var(--weiss); }
.prio-p2 { background: var(--gruen); color: var(--weiss); }
.prio-p3 { background: var(--sand); color: var(--gruen); }

/* ── STATUS CHIPS ───────────────────────────────────────── */
.status-chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-lg { font-size: 0.9rem; padding: 0.35rem 1rem; }

.status-NEU                { background: #e5e7eb; color: #374151; }
.status-ANGERUFEN          { background: #dbeafe; color: #1e40af; }
.status-RUECKRUF_OFFEN     { background: #fef3c7; color: #92400e; }
.status-TERMIN_VEREINBART  { background: #ede9fe; color: #5b21b6; }
.status-PROBE_GESCHICKT    { background: #fce7f3; color: #9d174d; }
.status-IN_VERHANDLUNG     { background: #ffedd5; color: #9a3412; }
.status-ZUSAGE__Kunde__    { background: #d1fae5; color: #065f46; }
.status-ABSAGE             { background: #fee2e2; color: #991b1b; }
.status-SPAETER__Saison_   { background: #f3f4f6; color: #6b7280; }

/* ── CONTACT LIST ───────────────────────────────────────── */
.contact-list { display: flex; flex-direction: column; gap: 0.5rem; }
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--creme);
  border-radius: 8px;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.contact-row-left  { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
.contact-row-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.contact-name { font-weight: 600; font-size: 0.95rem; }
.contact-meta { font-size: 0.8rem; color: var(--grau); display: block; }
.contact-overdue { border-left: 3px solid var(--rot); }
.overdue-label { font-size: 0.78rem; color: var(--rot); font-weight: 600; }

/* ── ACTION BOX ─────────────────────────────────────────── */
.action-box {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.action-info { display: flex; gap: 0.75rem; flex: 1; min-width: 0; }
.action-name { font-size: 1.2rem; font-weight: 700; display: block; }
.action-meta { font-size: 0.85rem; color: var(--grau); }
.action-hint { font-size: 0.82rem; color: var(--gruen-l); margin-top: 0.3rem; font-style: italic; }
.action-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ── STATS GRID ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--schatten);
}
.stat-number { font-size: 2.2rem; font-weight: 700; color: var(--gruen); }
.stat-label  { font-size: 0.8rem; color: var(--grau); margin-top: 0.25rem; }
.stat-green .stat-number { color: #10b981; }
.stat-orange .stat-number { color: var(--mand); }

/* ── PIPELINE OVERVIEW ──────────────────────────────────── */
.pipeline-overview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pipeline-step {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  background: var(--grau-l);
  color: var(--grau);
  font-size: 0.75rem;
  transition: all 0.15s;
  text-decoration: none;
}
.pipeline-step-active {
  background: var(--gruen);
  color: var(--creme);
}
.pipeline-step:hover { opacity: 0.85; }
.pipeline-count { font-size: 1.4rem; font-weight: 700; }
.pipeline-label { font-size: 0.7rem; margin-top: 0.2rem; }

/* ── QUICK LINKS ────────────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.quick-card {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--schatten);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gruen);
  transition: all 0.15s;
  text-decoration: none;
}
.quick-card:hover { background: var(--gruen); color: var(--creme); transform: translateY(-2px); }
.quick-icon { font-size: 1.8rem; }

/* ── DATE BADGE ─────────────────────────────────────────── */
.date-badge {
  background: var(--gruen);
  color: var(--creme);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── FILTER ─────────────────────────────────────────────── */
.filter-card { padding: 1rem 1.5rem; }
.filter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-input, .filter-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.88rem;
  background: var(--weiss);
  color: var(--gruen);
}
.filter-input { min-width: 180px; }
.filter-select { min-width: 160px; }

/* ── TABLE ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  background: var(--gruen);
  color: var(--creme);
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--sand-l);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--creme); }
.table-link { font-weight: 600; }
.table-sub  { font-size: 0.78rem; color: var(--grau); }
.tel-link   { color: var(--mand); font-weight: 500; }
.action-cell { white-space: nowrap; }
.list-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.list-count  { font-weight: 600; color: var(--grau); }

/* ── EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--grau);
}
.empty-state p { margin-bottom: 1rem; }

/* ── DETAIL GRID ────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.detail-left, .detail-right { display: flex; flex-direction: column; gap: 0; }

/* ── INFO LIST ──────────────────────────────────────────── */
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: 0.9rem; }
.info-list dt { color: var(--grau); font-weight: 500; white-space: nowrap; }
.info-list dd { color: var(--gruen); word-break: break-word; }
.notiz-text { font-style: italic; color: var(--gruen-l); }

/* ── STATUS BUTTONS ─────────────────────────────────────── */
.status-current { margin-bottom: 0.75rem; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── WIEDERVORLAGE ──────────────────────────────────────── */
.wv-current { margin-bottom: 0.75rem; font-size: 0.9rem; }
.wv-form    { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.wv-quick   { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.wv-label   { font-size: 0.8rem; color: var(--grau); }

/* ── ACTIVITY FORM ──────────────────────────────────────── */
.activity-form { display: flex; flex-direction: column; gap: 0.75rem; }
.faustregel-box {
  background: #fef3c7;
  border-left: 3px solid var(--mand);
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #92400e;
}

/* ── ACTIVITY LIST ──────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0.75rem; }
.activity-item {
  padding: 0.75rem;
  background: var(--creme);
  border-radius: 8px;
  border-left: 3px solid var(--gruen);
}
.activity-header { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.activity-art    { font-weight: 600; font-size: 0.88rem; }
.activity-date   { font-size: 0.8rem; color: var(--grau); }
.activity-notiz  { font-size: 0.88rem; margin-bottom: 0.3rem; }
.activity-next   { font-size: 0.82rem; color: var(--gruen-l); }
.activity-wv     { font-size: 0.78rem; color: var(--mand); margin-top: 0.25rem; }

/* ── FORMS ──────────────────────────────────────────────── */
.form-card { max-width: 700px; }
.main-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--gruen); }
.form-group-sm { max-width: 200px; }
.form-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--gruen);
  background: var(--weiss);
  transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 2px rgba(26,58,42,0.1); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.78rem; color: var(--grau); }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }

/* ── KANBAN ─────────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
}
.kanban-col {
  min-width: 200px;
  max-width: 220px;
  flex-shrink: 0;
  background: var(--grau-l);
  border-radius: var(--radius);
  overflow: hidden;
}
.kanban-col-header {
  background: var(--gruen);
  color: var(--creme);
  padding: 0.6rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kanban-col-title { font-size: 0.78rem; font-weight: 700; }
.kanban-col-count {
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.kanban-cards { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.kanban-card {
  background: var(--weiss);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.15s;
  text-decoration: none;
  color: var(--gruen);
}
.kanban-card:hover { box-shadow: 0 3px 8px rgba(26,58,42,0.15); transform: translateY(-1px); }
.prio-border-p1 { border-left: 3px solid var(--mand); }
.prio-border-p2 { border-left: 3px solid var(--gruen); }
.prio-border-p3 { border-left: 3px solid var(--sand); }
.kanban-card-top  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.kanban-card-name { font-weight: 600; font-size: 0.82rem; }
.kanban-card-ort  { font-size: 0.75rem; color: var(--grau); }
.kanban-card-tel  { font-size: 0.75rem; color: var(--mand); margin-top: 0.2rem; }
.kanban-wv        { font-size: 0.7rem; color: var(--grau); }
.kanban-wv-due    { color: var(--rot); font-weight: 600; }
.kanban-empty     { text-align: center; padding: 1rem; color: var(--grau); font-size: 0.8rem; }

/* ── KALKULATOR ─────────────────────────────────────────── */
.kalk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.kalk-form { display: flex; flex-direction: column; gap: 1rem; }
.input-with-unit { display: flex; align-items: center; gap: 0.5rem; }
.input-with-unit .form-input { flex: 1; }
.unit { font-size: 0.85rem; color: var(--grau); white-space: nowrap; }
.unit-sep { color: var(--grau); }
.input-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; }
.input-row .form-input { flex: 1; }
.quick-menge { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }

.kalk-ergebnis { min-height: 100px; }
.ergebnis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.ergebnis-item {
  background: var(--creme);
  border-radius: 8px;
  padding: 0.75rem;
}
.ergebnis-label { font-size: 0.78rem; color: var(--grau); margin-bottom: 0.2rem; }
.ergebnis-value { font-weight: 600; font-size: 0.95rem; }
.ergebnis-total { grid-column: 1 / -1; background: var(--sand-l); }
.ergebnis-highlight { background: var(--gruen); color: var(--creme); }
.ergebnis-highlight .ergebnis-label { color: rgba(245,241,232,0.7); }
.ergebnis-green { background: #d1fae5; }
.ergebnis-big { font-size: 1.3rem; }
.ergebnis-hinweis {
  font-size: 0.82rem;
  color: var(--grau);
  background: #fef3c7;
  padding: 0.6rem;
  border-radius: 6px;
}

.kalk-referenz { margin-top: 1.5rem; }
.kalk-referenz h3 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--gruen); }
.ref-table { width: 100%; font-size: 0.82rem; border-collapse: collapse; }
.ref-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--sand-l); }
.ref-table td:last-child { text-align: right; font-weight: 600; }

/* ── KALKULATOR PREVIEW ─────────────────────────────────── */
.kalk-preview {
  background: var(--creme);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ── RECHNUNG PREVIEW ───────────────────────────────────── */
.rechnung-preview {
  max-width: 800px;
  font-size: 0.9rem;
}
.re-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.re-logo-block { display: flex; align-items: center; gap: 1rem; }
.re-logo { height: 60px; width: auto; }
.re-firma { font-size: 1.3rem; font-weight: 700; color: var(--gruen); }
.re-sub   { font-size: 0.8rem; color: var(--grau); }
.re-info-block { text-align: right; }
.re-info-table { font-size: 0.88rem; border-collapse: collapse; }
.re-info-table td { padding: 0.2rem 0.5rem; }
.re-info-table td:first-child { color: var(--grau); }
.re-divider { border: none; border-top: 2px solid var(--mand); margin: 1rem 0; }
.re-empfaenger { margin-bottom: 1.5rem; }
.re-empfaenger-label { font-size: 0.78rem; color: var(--grau); margin-bottom: 0.25rem; }
.re-empfaenger-name  { font-size: 1rem; font-weight: 700; }
.re-pos-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.re-pos-table th {
  background: var(--gruen);
  color: var(--creme);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.re-pos-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--sand-l);
  vertical-align: top;
}
.re-summen { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.re-summen-table { font-size: 0.9rem; border-collapse: collapse; min-width: 300px; }
.re-summen-table td { padding: 0.35rem 0.75rem; }
.re-summen-table td:last-child { text-align: right; }
.re-total-row td { border-top: 2px solid var(--mand); padding-top: 0.6rem; font-size: 1rem; color: var(--gruen); }
.re-notizen { background: var(--creme); padding: 0.75rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1rem; }
.re-footer  { font-size: 0.75rem; color: var(--grau); text-align: center; }

/* ── WHATSAPP ────────────────────────────────────────────── */
.wa-hint    { font-size: 0.82rem; color: var(--grau); margin-bottom: 0.75rem; }
.wa-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── UTILITIES ──────────────────────────────────────────── */
.text-red    { color: var(--rot); }
.text-orange { color: var(--mand); }
.text-muted  { color: var(--grau); font-size: 0.88rem; }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--gruen);
  color: rgba(245,241,232,0.6);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.78rem;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .kalk-grid   { grid-template-columns: 1fr; }
  .form-row    { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links  {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--gruen);
    padding: 1rem;
    gap: 0.5rem;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-link, .nav-btn { width: 100%; text-align: center; }

  .main-content { padding: 1rem; }
  .page-header  { flex-direction: column; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
  .pipeline-overview { gap: 0.3rem; }
  .pipeline-step { min-width: 60px; font-size: 0.65rem; }
  .kanban-board { gap: 0.5rem; }
  .kanban-col   { min-width: 160px; }
  .ergebnis-grid { grid-template-columns: 1fr; }
  .action-box   { flex-direction: column; }
  .contact-row  { flex-direction: column; align-items: flex-start; }
  .re-header    { flex-direction: column; }
  .re-info-block { text-align: left; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-links { grid-template-columns: 1fr 1fr; }
  .filter-form { flex-direction: column; }
  .filter-input, .filter-select { width: 100%; }
}

/* ── NAV USER ────────────────────────────────────────────── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.5rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255,255,255,0.2);
}
.nav-user-name {
  color: var(--mand);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0 0.25rem;
}
.nav-logout {
  color: rgba(245,241,232,0.6) !important;
}
.nav-logout:hover {
  color: var(--rot) !important;
  background: rgba(192,57,43,0.15) !important;
}

/* ── BADGE RED ───────────────────────────────────────────── */
.badge-red { background: var(--rot); color: var(--weiss); }

/* ── PROVISION TABLE ─────────────────────────────────────── */
.provision-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.provision-table th {
  background: var(--waldgruen);
  color: var(--creme);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}
.provision-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--sand);
}
.provision-table tr:last-child td { border-bottom: none; }
.provision-table tr:hover td { background: rgba(203,185,158,0.15); }
.provision-hint { color: var(--sand); font-style: italic; font-size: 0.85rem; }

/* ── NAV LOGO WRAPPER (weißer Hintergrund damit Logo sichtbar) ── */
.nav-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 8px;
  margin-right: 4px;
  height: 52px;
}
.nav-logo-wrap .nav-logo {
  height: 44px;
  width: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════════
   LKW-TRACKER — Modul A
   ══════════════════════════════════════════════════════════ */

/* ── Lkw-Board Grid ─────────────────────────────────────── */
.lkw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* ── Lkw-Karte ──────────────────────────────────────────── */
.lkw-card {
  background: var(--weiss);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(26,58,42,0.08);
  border: 2px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lkw-card:hover { box-shadow: 0 4px 20px rgba(26,58,42,0.14); }
.lkw-card-voll  { border-color: #2d7a3a; }

.lkw-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 0.5rem;
}
.lkw-name  { font-size: 1.05rem; font-weight: 700; color: var(--waldgruen); }
.lkw-datum { font-size: 0.8rem; color: var(--grau); margin-top: 0.2rem; }

/* ── Status-Badges ──────────────────────────────────────── */
.lkw-status-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.lkw-status-Planung    { background: #e8f0fe; color: #1a56db; }
.lkw-status-Vorverkauf { background: #fff3cd; color: #856404; }
.lkw-status-Bereit     { background: #d4edda; color: #155724; }
.lkw-status-Unterwegs  { background: #cce5ff; color: #004085; }
.lkw-status-Geliefert  { background: #d1ecf1; color: #0c5460; }
.lkw-status-Storniert  { background: #f8d7da; color: #721c24; }

/* ── Fortschrittsbalken ─────────────────────────────────── */
.lkw-progress-bar {
  width: 100%;
  height: 14px;
  background: var(--sand);
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.lkw-progress-bar-lg { height: 20px; border-radius: 10px; }
.lkw-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mandarine), #e8a04a);
  border-radius: 7px;
  transition: width 0.4s ease;
  min-width: 2px;
}

.lkw-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}
.lkw-progress-count { color: var(--waldgruen); }
.lkw-frei           { color: var(--grau); }
.lkw-frei-null      { color: #2d7a3a; font-weight: 700; }

/* ── KPI-Zeile ──────────────────────────────────────────── */
.lkw-kpi-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.lkw-kpi {
  flex: 1;
  background: var(--creme);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  text-align: center;
}
.lkw-kpi-green { background: #d4edda; }
.lkw-kpi-val   { font-size: 0.95rem; font-weight: 700; color: var(--waldgruen); }
.lkw-kpi-label { font-size: 0.7rem; color: var(--grau); margin-top: 0.1rem; }

/* ── Karten-Aktionen ────────────────────────────────────── */
.lkw-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ── Dashboard-Widget ───────────────────────────────────── */
.lkw-widget {
  background: var(--gruen);   /* #1A3A2A – waldgrün */
  color: var(--creme);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.lkw-widget-icon { font-size: 2.5rem; flex-shrink: 0; }
.lkw-widget-info { flex: 1; min-width: 160px; }
.lkw-widget-name { font-size: 1rem; font-weight: 700; opacity: 0.85; }
.lkw-widget-count { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.lkw-widget-sub  { font-size: 0.82rem; opacity: 0.8; margin-top: 0.2rem; }
.lkw-widget-bar-wrap { flex: 2; min-width: 160px; }
.lkw-widget-bar {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}
.lkw-widget-fill {
  height: 100%;
  background: var(--mand);
  border-radius: 6px;
  transition: width 0.4s;
}
.lkw-widget-bar-label {
  font-size: 0.78rem;
  opacity: 0.8;
  text-align: right;
}
.lkw-widget-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.btn-lkw {
  background: var(--mand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
}
.btn-lkw:hover { background: #c07030; color: #fff; }
.btn-lkw-outline {
  background: transparent;
  color: var(--creme);
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
}
.btn-lkw-outline:hover { background: rgba(255,255,255,0.12); color: var(--creme); }

/* ── LKW-Widget + Lkw-Board: Mobil ─────────────────────── */
@media (max-width: 600px) {
  .lkw-grid { grid-template-columns: 1fr; }
  .lkw-kpi-row { flex-wrap: wrap; }
  .lkw-kpi { min-width: calc(50% - 0.25rem); }

  /* LKW-Widget Dashboard: einspaltig, kein flex-wrap mehr */
  .lkw-widget {
    flex-direction: column;
    flex-wrap: nowrap;   /* verhindert Geisterkasten durch wrap */
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem 1rem 1.1rem;
  }
  /* Emoji-Icon weglassen – spart Platz, kein leerer Kasten */
  .lkw-widget-icon { display: none; }

  /* Info-Block: volle Breite */
  .lkw-widget-info {
    min-width: 0;
    width: 100%;
  }
  .lkw-widget-count { font-size: 1.6rem; }

  /* Fortschrittsbalken: volle Breite, immer sichtbar */
  .lkw-widget-bar-wrap {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  /* Aktions-Buttons: gestapelt, volle Breite */
  .lkw-widget-actions {
    width: 100%;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  /* "Details →" Button: Mandarine auf dunklem Grün = hoher Kontrast */
  .btn-lkw {
    display: flex;
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    min-height: 48px;
    box-sizing: border-box;
    background: var(--mand);   /* Mandarine – gut sichtbar auf Waldgrün */
    color: #fff;
    border-radius: 10px;
  }
  .btn-lkw:hover,
  .btn-lkw:active { background: #c07030; color: #fff; }

  /* "Alle Lkw" Button: weißer Rand, creme Text */
  .btn-lkw-outline {
    display: flex;
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    box-sizing: border-box;
    border-color: rgba(255,255,255,0.75);
    color: var(--creme);
    border-radius: 10px;
  }
  .btn-lkw-outline:hover,
  .btn-lkw-outline:active { background: rgba(255,255,255,0.12); }
}

/* ── Modul A(f): ZUSAGE → Lkw-Reservierung ─────────────────── */
.card-zusage-lkw {
  border-left: 4px solid #2e7d32;
  background: linear-gradient(135deg, #f1f8e9 0%, #fff 60%);
}
.zusage-hint {
  font-size: .9rem;
  color: #444;
  margin-bottom: .75rem;
}
.lkw-res-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.lkw-res-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  cursor: pointer;
  padding-bottom: .25rem;
}
.lkw-res-form .checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #2e7d32;
}
/* Pipeline: ZUSAGE card highlight */
.kanban-card-zusage {
  border-left: 3px solid #2e7d32 !important;
  background: linear-gradient(135deg, #f1f8e9 0%, #fff 80%);
}
.kanban-card-lkw-hint {
  margin-top: .4rem;
  font-size: .78rem;
  color: #2e7d32;
  font-weight: 600;
  letter-spacing: .01em;
}
@media (max-width: 600px) {
  .lkw-res-form .form-row { grid-template-columns: 1fr; }
}

/* ── Provisions-System v3: Rollen-Badges ────────────────────── */
.nav-rolle-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.nav-rolle-admin   { background: #d97706; color: #fff; }
.nav-rolle-familie { background: #059669; color: #fff; }
.nav-rolle-extern  { background: #6b7280; color: #fff; }

/* Provision-Link in Nav hervorheben */
.nav-link-provision {
  font-weight: 600;
  color: #d97706 !important;
}
.nav-link-provision:hover,
.nav-link-provision.active {
  color: #92400e !important;
}

/* ── Preis-Ampel Farben ──────────────────────────────────────── */
.ampel-rot   { background:#fee2e2; color:#dc2626; border:2px solid #dc2626; }
.ampel-gelb  { background:#fefce8; color:#854d0e; border:2px solid #eab308; }
.ampel-gruen { background:#f0fdf4; color:#166534; border:2px solid #22c55e; }
.ampel-gold  { background:#fef3c7; color:#92400e; border:2px solid #f59e0b; }

/* ── Dashboard Mobile-Fixes (~390px) ────────────────────────── */
@media (max-width: 480px) {
  /* JETZT ANRUFEN – action-box einspaltig */
  .action-box {
    flex-direction: column;
    gap: 0.75rem;
  }
  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .action-buttons .btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
    font-size: 0.95rem;
  }
  /* Kontakt-Zeilen: Buttons stapeln */
  .contact-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .contact-row-right {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .contact-row-right .btn {
    min-height: 40px;
    font-size: 0.88rem;
  }
  /* Stats-Grid: 2 Spalten auf Handy */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Pipeline-Übersicht: scrollbar */
  .pipeline-overview {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
  }
  /* Quick-Links: 2 Spalten */
  .quick-links {
    grid-template-columns: 1fr 1fr;
  }
  /* Page-Header: einspaltig */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .page-header .btn {
    width: 100%;
    text-align: center;
  }
}

/* ── Provision-Tabellen-Zeilen ───────────────────────────────── */
.prov-row-gold  { background: #fffbeb !important; }
.prov-row-gruen { background: #f0fdf4 !important; }
.prov-row-gelb  { background: #fefce8 !important; }
.prov-row-rot   { background: #fef2f2 !important; }

/* ── Verdienst-Dashboard KPI-Karten ─────────────────────────── */
.prov-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.prov-kpi-card {
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.prov-kpi-gesamt  { background: linear-gradient(135deg, #1a3a2a, #2d6a4f); }
.prov-kpi-offen   { background: linear-gradient(135deg, #d97706, #f59e0b); }
.prov-kpi-bezahlt { background: linear-gradient(135deg, #059669, #10b981); }
.prov-kpi-top     { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.prov-kpi-label   { font-size: 0.78rem; opacity: 0.85; margin-bottom: 0.3rem; }
.prov-kpi-value   { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.prov-kpi-sub     { font-size: 0.72rem; opacity: 0.75; margin-top: 0.3rem; }

/* ── Ziel-Ring ───────────────────────────────────────────────── */
.prov-ring-wrap { display: flex; justify-content: center; margin: 0.5rem 0; }
.prov-ring { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1)); }

@media (max-width: 600px) {
  .prov-kpi-grid { grid-template-columns: 1fr 1fr; }
  .prov-kpi-value { font-size: 1.4rem; }
}
