/* ============================================================================
 *  akquise.css – Stile für den Akquise-Bereich
 *  Baut auf den Variablen aus styles.css auf (--accent, --surface, …).
 * ========================================================================== */

/* --- Reiter in der Kopfzeile ------------------------------------------------- */
.topbar .nav {
  display: flex;
  gap: 2px;
  margin-right: auto;
  margin-left: 28px;
}
.topbar .nav a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--text-mut);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.topbar .nav a:hover { color: var(--text); background: var(--surface); }
.topbar .nav a.an { color: var(--text); background: var(--surface-2); }

/* --- Kopfbereich -------------------------------------------------------------- */
.akq-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
}
.akq-kopf h1 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.akq-kopf .sub { color: var(--text-dim); font-size: 13px; margin: 0; }

.akq-zahlen { display: flex; gap: 10px; flex-wrap: wrap; }
.akq-zahlen .zahl {
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}
.akq-zahlen .zahl b {
  display: block;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.akq-zahlen .zahl span { font-size: 11.5px; color: var(--text-mut); }
.akq-zahlen .gluehend b { color: var(--gold); }
.akq-zahlen .gut b { color: var(--good); }

/* --- Suchlauf-Klappbereich ---------------------------------------------------- */
.akq-suche {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 14px;
  overflow: hidden;
}
/* Die Leiste ist anklickbar – das muss man ihr auch ansehen: eigene Fläche,
   Pfeil rechts, deutliche Reaktion beim Überfahren. */
.akq-suche > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  list-style: none;
  user-select: none;
  background: var(--fl-2);
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.akq-suche > summary:hover { background: var(--fl-3); }
.akq-suche > summary:focus-visible { outline: 2px solid var(--accent-hell); outline-offset: -2px; }
.akq-suche[open] > summary { border-bottom: 1px solid var(--border-soft); }
.akq-suche > summary::-webkit-details-marker { display: none; }
.akq-suche > summary::after {
  content: '▾';
  color: var(--text-mut);
  transition: transform 0.2s var(--ease);
}
.akq-suche[open] > summary::after { transform: rotate(180deg); }
.akq-suche > summary:hover { background: var(--surface-2); }
.akq-suche-info { color: var(--text-mut); font-size: 12px; font-weight: 400; margin-left: auto; }

.akq-suche-inhalt { padding: 4px 18px 18px; border-top: 1px solid var(--border-soft); }
.akq-suche-inhalt .feld { margin-top: 14px; }
.akq-suche-inhalt label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 550;
}
.feld-reihe {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.feld-reihe .feld { flex: 1; min-width: 220px; margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-mut);
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.an {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.chip-schnell { margin-top: 9px; font-size: 12px; color: var(--text-mut); }
.chip-schnell .link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
}

.radius-zeile { display: flex; align-items: center; gap: 12px; }
.radius-zeile input[type="range"] { flex: 1; accent-color: var(--accent); }
.radius-zeile output {
  min-width: 52px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  font-size: 13px;
}
.akq-suche-inhalt .hinweis {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-mut);
  line-height: 1.55;
}

/* --- Aufforderung, Websites zu prüfen ------------------------------------------ */
.akq-pruefen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--accent-linie);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 13px;
}
.akq-pruefen .dim { color: var(--text-dim); display: block; font-size: 12px; margin-top: 2px; }

/* --- Filterzeile ---------------------------------------------------------------- */
.akq-filter {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.akq-filter input,
.akq-filter select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.akq-filter input { flex: 1; min-width: 190px; }
.akq-filter input:focus,
.akq-filter select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.akq-anzahl {
  font-size: 12px;
  color: var(--text-mut);
  margin: 0 0 10px 2px;
}
.akq-anzahl b { color: var(--text-dim); font-weight: 600; }
.akq-anzahl .dim { opacity: 0.7; }

.akq-mehr {
  display: block;
  width: 100%;
  margin-top: 6px;
}

/* --- Eine Betriebs-Karte --------------------------------------------------------- */
.lead {
  display: grid;
  grid-template-columns: 68px 1fr 210px;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  margin-bottom: 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s var(--ease), opacity 0.15s var(--ease);
}
.lead:hover { border-color: var(--border); }
.lead.aus { opacity: 0.45; }

/* Prioritäts-Anker links */
.lead-prio {
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
}
.lead-prio b {
  display: block;
  font-size: 19px;
  font-weight: 680;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.lead-prio span { font-size: 10px; color: var(--text-mut); line-height: 1.25; display: block; margin-top: 2px; }
.lead-prio.gluehend { background: var(--danger-soft); border-color: rgba(240, 85, 79, 0.4); }
.lead-prio.gluehend b { color: var(--gold); }
.lead-prio.heiss { background: var(--accent-soft); border-color: var(--accent-linie); }
.lead-prio.heiss b { color: var(--accent); }
.lead-prio.lau b { color: var(--text-dim); }
.lead-prio.kalt { opacity: 0.7; }
.lead-prio.kalt b { color: var(--text-mut); }

/* Mitte */
.lead-titel {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.lead-titel h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 620;
  letter-spacing: -0.005em;
}
.lead-typ { font-size: 11.5px; color: var(--text-mut); }
.lead-status {
  font-size: 10.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--f) 18%, transparent);
  color: var(--f);
  border: 1px solid color-mix(in srgb, var(--f) 35%, transparent);
  font-weight: 550;
}
.lead-adresse { margin: 0 0 4px; font-size: 12.5px; color: var(--text-dim); }
.lead-adresse .warn { color: var(--accent-hell); }

.lead-befund { margin: 0 0 9px; font-size: 12.5px; color: var(--text-dim); }
.lead-befund.gluehend { color: var(--gold); font-weight: 550; }
.lead-befund.heiss { color: var(--accent); }
.lead-befund a { color: var(--text-mut); }

.lead-aktionen { display: flex; gap: 6px; flex-wrap: wrap; }
/* Kleine Aktions-Knöpfe am Lead. Bewusst mit Fläche, Rand und Lichtkante –
   vorher waren sie durchsichtig und sahen aus wie reiner Text. */
.mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--knopf-rand);
  background: linear-gradient(180deg, var(--knopf), var(--knopf-tief));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 1px 2px rgba(0, 0, 0, 0.45);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms var(--ease), border-color 160ms var(--ease),
              color 160ms var(--ease), box-shadow 160ms var(--ease), transform 90ms var(--ease);
}
.mini:hover { background: linear-gradient(180deg, var(--knopf-hover), var(--knopf)); border-color: var(--knopf-rand-hover); color: var(--text); }
.mini:active { transform: translateY(1px); background: var(--knopf-tief); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45) inset; }
.mini:focus-visible { outline: 2px solid var(--accent-hell); outline-offset: 2px; }
.mini:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.mini:disabled:active { transform: none; }
.mini.gefahr:hover { color: var(--gefahr); border-color: rgba(240, 85, 79, 0.55); }

/* Rechts: Stand + Notiz */
.lead-steuer { display: flex; flex-direction: column; gap: 7px; }
.lead-steuer select,
.lead-steuer textarea {
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
}
.lead-steuer textarea { resize: vertical; min-height: 42px; line-height: 1.45; }
.lead-steuer select:focus,
.lead-steuer textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* --- Fußnote zur Datenquelle ------------------------------------------------------ */
.akq-quelle {
  margin: 26px 0 0;
  font-size: 11.5px;
  color: var(--text-mut);
  line-height: 1.6;
  text-align: center;
}
.akq-leer { text-align: left; max-width: 520px; line-height: 1.65; }
.akq-leer p { margin: 0 0 10px; }

/* --- Schmale Bildschirme ---------------------------------------------------------- */
@media (max-width: 820px) {
  .topbar .nav { margin-left: 12px; }
  .lead { grid-template-columns: 56px 1fr; }
  .lead-steuer { grid-column: 1 / -1; }
  .akq-zahlen { width: 100%; }
  .akq-zahlen .zahl { flex: 1; min-width: 76px; }

  /* Am Handy wird mit dem Daumen bedient – Aktionen brauchen echte Fläche. */
  .lead-aktionen { gap: 8px; }
  .mini {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
  }
  .chip { min-height: 38px; display: inline-flex; align-items: center; }
  .topbar .nav a { min-height: 40px; display: inline-flex; align-items: center; }
  .lead-steuer select { min-height: 40px; }
}

/* --- Ruhige Darstellung, wenn der Nutzer weniger Bewegung wünscht ----------------- */
@media (prefers-reduced-motion: reduce) {
  .chip, .mini, .lead, .topbar .nav a, .akq-suche > summary::after { transition: none; }
}
