/* ChatPilot Inmobiliaria – einheitliches UI (wird nach app.css und den Themes geladen) */

:root {
  --ui-navy: #111827;        /* gleiche Farbe wie die Navigationsleiste */
  --ui-navy-hover: #263449;
  --ui-ink: #172033;
  --ui-muted: #687387;
  --ui-line: #e6eaf0;
  --ui-surface: #ffffff;
  --ui-surface-2: #f6f8fb;
  --ui-zebra: #e6edf8;      /* abwechselnder Hintergrund in Listen */
  --ui-green: #15803d;
  --ui-green-soft: #e7f6ec;
  --ui-red: #b42318;
  --ui-red-soft: #fdf0ef;
  --ui-accent: #2f5fe0;      /* Links (Leads, Link kopieren) */
  --ui-radius: 8px;
  --ui-font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
body[data-theme="dark"] {
  --ui-navy: #e5eaf3;
  --ui-navy-hover: #ffffff;
  --ui-ink: #eef2f8;
  --ui-muted: #a3afc2;
  --ui-line: #2f3c52;
  --ui-surface: #1b2536;
  --ui-surface-2: #172031;
  --ui-zebra: #25344f;
  --ui-green: #4ade80;
  --ui-green-soft: rgba(74, 222, 128, .12);
  --ui-red: #f87171;
  --ui-red-soft: rgba(248, 113, 113, .1);
  --ui-accent: #9db3ff;
}

/* Eine Schrift für alles – auch Buttons, Eingaben und Auswahllisten */
body,
button,
input,
select,
textarea {
  font-family: var(--ui-font);
}

/* ---------- Buttons ---------- */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  width: auto;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ui-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.ui-btn:focus-visible,
.ui-icon-btn:focus-visible,
.media-toggle:focus-visible,
.bot-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.ui-btn:disabled {
  opacity: .55;
  cursor: default;
}
.ui-btn-primary {
  background: var(--ui-navy);
  color: #fff;
}
.ui-btn-primary:hover {
  background: var(--ui-navy-hover);
}
body[data-theme="dark"] .ui-btn-primary {
  color: #111827;
}
.ui-btn-secondary {
  background: var(--ui-surface);
  color: var(--ui-ink);
  border-color: var(--ui-line);
}
.ui-btn-secondary:hover {
  background: var(--ui-surface-2);
  border-color: #cfd6e1;
}
.ui-btn-danger {
  background: var(--ui-surface);
  color: var(--ui-red);
  border-color: var(--ui-line);
}
.ui-btn-danger:hover {
  background: var(--ui-red-soft);
  border-color: currentColor;
}
label.ui-btn input[type="file"] {
  display: none;
}

/* Status-Schalter "Activa / Inactiva" */
.status-toggle .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a0aab8;
}
.status-toggle.is-on {
  color: var(--ui-green);
  background: var(--ui-green-soft);
  border-color: transparent;
}
.status-toggle.is-on .status-dot {
  background: var(--ui-green);
}
.status-toggle.is-off {
  color: var(--ui-muted);
}

/* Runde Icon-Buttons auf den Fotos */
.ui-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #172033;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .25);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.ui-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-icon-btn:hover {
  background: #fff;
}
.ui-icon-danger:hover {
  color: #b42318;
}

/* ---------- Kopfzeile des Panels mit Kennzahlen ---------- */
.dash-topbar {
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
}
.dash-topbar h1 {
  font-size: 26px;
  letter-spacing: -.02em;
}
.kpi-strip {
  display: flex;
  margin: 0;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: 12px;
}
.kpi {
  padding: 10px 18px;
  min-width: 108px;
}
.kpi + .kpi {
  border-left: 1px solid var(--ui-line);
}
.kpi dt {
  font-size: 12px;
  color: var(--ui-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.kpi dd {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ui-ink);
  font-variant-numeric: tabular-nums;
}
.kpi-accent dd {
  color: #c2410c;
}
body[data-theme="dark"] .kpi-accent dd {
  color: #fb923c;
}

/* ---------- Immobilienliste ---------- */
.prop-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  overflow: hidden;
}
.prop-row + .prop-row {
  border-top: 1px solid var(--ui-line);
}
.prop-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
}
.prop-row.is-inactive .prop-thumb,
.prop-row.is-inactive .prop-info,
.prop-row.is-inactive .prop-price {
  opacity: .55;
}
.prop-thumb {
  width: 96px;
  height: 68px;
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: var(--ui-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.prop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prop-thumb-empty svg,
.empty-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #a0aab8;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.prop-info {
  min-width: 0;
}
.prop-info h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ui-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-location,
.prop-facts {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  color: var(--ui-muted);
}
.prop-facts {
  gap: 4px 14px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.prop-facts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.prop-location svg,
.prop-facts svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.prop-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--ui-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.prop-actions {
  display: flex;
  gap: 8px;
}

/* Aufklapp-Leiste "Fotos y folleto" */
.media-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 16px;
  border: 0;
  border-top: 1px dashed var(--ui-line);
  border-radius: 0;
  background: transparent;
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.media-toggle:hover {
  background: var(--ui-surface-2);
}
.media-toggle .media-count {
  margin-left: auto;
  font-weight: 500;
  color: var(--ui-muted);
}
.media-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--ui-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .25s ease;
}
.media-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
/* Höhe animiert über grid-template-rows (0fr → 1fr) */
.media-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.media-panel.is-open {
  grid-template-rows: 1fr;
}
.media-panel-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 16px;
  background: var(--ui-surface-2);
}
.media-panel.is-open .media-panel-inner {
  padding: 14px 16px 16px;
}
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.media-tile {
  position: relative;
  width: 116px;
  height: 84px;
  margin: 0;
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: var(--ui-line);
}
.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-tile.is-cover {
  box-shadow: 0 0 0 2px var(--ui-surface-2), 0 0 0 4px #111827;
}
body[data-theme="dark"] .media-tile.is-cover {
  box-shadow: 0 0 0 2px var(--ui-surface-2), 0 0 0 4px #e5eaf3;
}
.media-tile .ui-icon-btn {
  position: absolute;
  top: 6px;
}
.media-tile .cover-photo-button {
  left: 6px;
}
.media-tile .delete-media-button {
  right: 6px;
}
.media-tile .cover-photo-button.selected {
  background: #111827;
  color: #facc15;
}
.media-tile .cover-photo-button.selected svg {
  fill: currentColor;
}
/* Auf Geräten mit Maus erscheinen die Knöpfe erst beim Darüberfahren */
@media (hover: hover) {
  .media-tile .ui-icon-btn:not(.selected) {
    opacity: 0;
    transition: opacity .15s ease;
  }
  .media-tile:hover .ui-icon-btn,
  .media-tile:focus-within .ui-icon-btn {
    opacity: 1;
  }
}
.media-tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 7px;
  background: rgba(17, 24, 39, .78);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.media-empty {
  margin: 0;
  font-size: 13px;
  color: var(--ui-muted);
}
.pdf-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pdf-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 420px;
  padding: 6px 6px 6px 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
}
.pdf-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-list a svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex-shrink: 0;
}
.pdf-list .ui-icon-btn {
  position: static;
  box-shadow: none;
  background: transparent;
  color: var(--ui-muted);
}
.media-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.media-actions .upload-status {
  font-size: 12px;
  color: var(--ui-muted);
}

/* ---------- Chatbot-Schalter auf der Lead-Karte ---------- */
.lead-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.bot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.bot-toggle:hover {
  background: var(--ui-surface-2);
}
.bot-switch {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: #d92d20;
  flex-shrink: 0;
  transition: background-color .18s ease;
}
.bot-switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .18s ease;
}
.bot-toggle.is-on .bot-switch {
  background: #16a34a;
}
.bot-toggle.is-on .bot-switch span {
  transform: translateX(12px);
}
.bot-toggle.is-off .bot-label {
  color: var(--ui-red);
}
.bot-toggle.is-on .bot-label {
  color: var(--ui-green);
}

/* ---------- Seitenleiste & Listen ---------- */
.sidebar .logout {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #2c3a52;
  border-radius: var(--ui-radius);
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}
.sidebar .logout:hover {
  background: #1e293b;
  color: #fff;
}
.recent-lead-link {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--ui-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.recent-lead-link:hover {
  text-decoration: underline;
}
#leadsView,
#excludedView {
  flex: 1;
  min-width: 0;
}
#leadsView .panel {
  max-width: 980px;
}

/* ---------- Notizen auf der Lead-Karte ---------- */
#leadsContainer .lead-notes {
  grid-column: 1 / -1;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  overflow: hidden;
}
.lead-notes .media-toggle {
  border-top: 0;
}
.lead-note-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
}
.lead-note-form textarea {
  flex: 1;
  min-height: 44px;
  margin: 0;
  resize: vertical;
}
.lead-note-form .ui-btn {
  width: auto;
  flex-shrink: 0;
}
.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
}
.note-list time {
  font-size: 12px;
  color: var(--ui-muted);
}
.note-list p {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ui-ink);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.note-list .ui-icon-btn {
  position: static;
  flex-shrink: 0;
  box-shadow: none;
  background: transparent;
  color: var(--ui-muted);
}
.lead-side .lead-delete-button {
  width: 100%;
}
#leadsView .panel-header {
  align-items: flex-start;
}
@media (max-width: 600px) {
  .lead-note-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Formulare: Hauptbutton auf voller Breite, Modal-Buttons nebeneinander */
.login-card .ui-btn,
#excludedForm .ui-btn {
  width: 100%;
  height: 42px;
  font-size: 14px;
}
.modal-actions .ui-btn {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* ---------- Suche & Sortierung (Números excluidos) ---------- */
#excludedView .panel-header {
  align-items: flex-start;
  gap: 16px;
}
.list-search {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
}
.list-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ui-muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.list-search input {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 12px 0 34px;
  border-radius: var(--ui-radius);
  font-size: 14px;
}
.list-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-muted);
  white-space: nowrap;
}
.list-sort select {
  width: auto;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  border-radius: var(--ui-radius);
  font-size: 13px;
}
.list-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--ui-muted);
}
@media (max-width: 700px) {
  #excludedView .panel-header {
    flex-wrap: wrap;
  }
  .list-search {
    flex: 1 1 100%;
  }
}

/* ---------- Filter & Suche (Leads) ---------- */
#leadsView .topbar {
  max-width: 980px;
  gap: 16px;
}
.leads-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 1 560px;
}
.leads-filters .list-sort select {
  max-width: 220px;
  height: 38px;
  font-size: 14px;
}
@media (max-width: 860px) {
  #leadsView .topbar {
    flex-wrap: wrap;
  }
  .leads-filters {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .leads-filters .list-sort,
  .leads-filters .list-search {
    flex: 1 1 220px;
  }
  .leads-filters .list-sort select {
    flex: 1;
    max-width: none;
  }
}

/* ---------- Leeres Panel ---------- */
.empty-state .ui-btn {
  margin-top: 6px;
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 1100px) {
  .prop-main {
    grid-template-columns: 96px minmax(0, 1fr) auto;
  }
  .prop-side {
    grid-column: 1 / -1;
    align-items: flex-end;
  }
  .prop-actions {
    justify-content: flex-end;
  }
}
@media (max-width: 700px) {
  .kpi-strip {
    width: 100%;
    flex-wrap: wrap;
  }
  .kpi {
    flex: 1 1 45%;
    min-width: 0;
  }
  .kpi:nth-child(3) {
    border-left: 0;
  }
  .kpi:nth-child(n + 3) {
    border-top: 1px solid var(--ui-line);
  }
  .prop-main {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
  }
  .prop-thumb {
    width: 72px;
    height: 54px;
  }
  .prop-price {
    grid-column: 2;
  }
  .prop-side {
    align-items: flex-start;
  }
  .prop-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .media-panel,
  .media-toggle svg,
  .bot-switch,
  .bot-switch span {
    transition: none;
  }
}

/* ---------- Öffentliche Seite des Maklers ---------- */
.public-page {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface-2);
}
.public-page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.public-page-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.public-page-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-muted);
}
.public-page-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.public-page-link:hover {
  text-decoration: underline;
}
.public-page-actions,
.public-page-form-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.public-page-form {
  margin-top: 12px;
}
.public-page-form.hidden {
  display: none;
}
.public-page-input {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  overflow: hidden;
}
.public-page-input span {
  padding: 0 0 0 10px;
  font-size: 13px;
  color: var(--ui-muted);
  white-space: nowrap;
}
.public-page-input input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 9px 10px 9px 1px;
  border: 0;
  background: transparent;
  color: var(--ui-ink);
  font-size: 13px;
  outline: none;
}
.public-page-hint {
  margin: 10px 0 0;
  font-size: 12px;
}
@media (max-width: 600px) {
  .public-page-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Klicks auf "Ver" ---------- */
.lead-views {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--ui-ink);
}
.lead-views.is-empty {
  color: var(--ui-muted);
}
.lead-views svg,
.prop-views svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.contact-none {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Listen: abwechselnder Hintergrund ---------- */
.prop-row:nth-child(even) {
  background: var(--ui-zebra);
}
#leadsContainer .lead-item {
  padding: 20px 16px;
  border-bottom: 0;
  border-radius: 10px;
}
#leadsContainer .lead-item:nth-child(even) {
  background: var(--ui-zebra);
}

/* ---------- Navigation mit Symbolen ---------- */
.app-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Einstellungen: Zahnrad oben rechts ---------- */
.dashboard {
  position: relative;
}
.settings-menu {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 60;
}
.settings-menu .settings-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: none;
}
.settings-menu .settings-button:hover,
.settings-menu .settings-button.is-open {
  background: var(--ui-surface-2);
}
.settings-menu .settings-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.7;
}
.settings-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 232px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: 0 10px 30px rgba(17, 24, 39, .16);
}
.settings-panel[hidden] {
  display: none;
}
.settings-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ui-muted);
}
.settings-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.settings-choices + .settings-title {
  margin-top: 14px;
}
.settings-panel label.settings-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-ink);
  cursor: pointer;
}
.settings-panel label.settings-choice:hover {
  background: var(--ui-surface-2);
}
.settings-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.settings-panel label.settings-choice:has(input:checked) {
  border-color: var(--ui-navy);
  background: var(--ui-surface-2);
  font-weight: 700;
}
.settings-choice:has(input:focus-visible) {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
.modal-card label.lang-label,
.lang-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.lang-label .muted {
  font-weight: 400;
}
.flags {
  display: inline-flex;
  gap: 3px;
}
.flag {
  display: block;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}
.mobile-footer {
  display: none;
}

/* Platz für das Zahnrad über dem Seiteninhalt (Computer) */
@media (min-width: 651px) {
  .dashboard > .main,
  #leadsView,
  #excludedView,
  #adminView {
    padding-top: 64px;
  }
}

/* ---------- Handy: Kopfzeile oben, Navigation unten ---------- */
@media (max-width: 650px) {
  .dashboard .sidebar {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    min-height: 62px;
    box-sizing: border-box;
  }
  .dashboard .sidebar-brand {
    padding: 0;
  }
  .dashboard .sidebar .logout {
    display: none;
  }
  .settings-menu {
    position: absolute;
    top: 12px;
    right: 14px;
  }
  .settings-menu .settings-button {
    border-color: #2c3a52;
    background: transparent;
    color: #e5eaf3;
  }
  .settings-menu .settings-button:hover,
  .settings-menu .settings-button.is-open {
    background: #1f2937;
  }
  nav.app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    overflow: visible;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: #111827;
    border-top: 1px solid #263247;
  }
  nav.app-nav a {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }
  nav.app-nav .nav-icon {
    width: 20px;
    height: 20px;
  }
  .mobile-footer {
    display: block;
    padding: 6px 20px calc(86px + env(safe-area-inset-bottom));
    text-align: center;
  }
  body .mobile-footer button.mobile-logout {
    margin: 0;
    padding: 8px 12px;
    border: 0;
    background: none;
    color: var(--ui-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
  }
  #leadsContainer .lead-item {
    padding: 18px 12px;
  }
}

/* ---------- Panel: Button "Ver en vivo" neben der Überschrift ---------- */
.dash-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.dash-title-row h1 {
  margin: 0;
}
.live-view-button {
  text-decoration: none;
}
.live-view-button.hidden {
  display: none;
}
.dash-title-row + .muted {
  margin-top: 6px;
}

/* ---------- Leads: kompakte Karte, Details erst über den Bleistift ---------- */
#leadsContainer .lead-item {
  display: block;
}
#leadsContainer .lead-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#leadsContainer .lead-contact-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}
#leadsContainer .lead-contact-heading strong {
  font-size: 16px;
}
body #leadsContainer .lead-item .lead-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: #263449;
  color: #fff;
  opacity: 1;
  cursor: pointer;
}
body #leadsContainer .lead-item .lead-edit-icon:hover,
body #leadsContainer .lead-item.is-expanded .lead-edit-icon {
  background: #34445e;
}
body #leadsContainer .lead-item .lead-edit-icon svg {
  width: 16px;
  height: 16px;
}
.lead-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  color: var(--ui-muted);
}
.lead-line svg,
.lead-action svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lead-action svg.icon-fill {
  fill: currentColor;
  stroke: none;
}
.lead-phone > span {
  color: var(--ui-ink);
  font-weight: 500;
}
.lead-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-decoration: none;
  flex-shrink: 0;
}
.lead-action-call {
  background: #1e3a8a;
  color: #fff;
}
.lead-action-wa {
  background: #25d366;
  color: #fff;
}
.lead-action-wa svg {
  width: 18px;
  height: 18px;
}
.lead-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #1d4ed8;
  text-decoration: none;
}
.lead-email span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-email:hover span {
  text-decoration: underline;
}
body[data-theme="dark"] .lead-email {
  color: #93b4ff;
}
.lead-property span {
  color: var(--ui-ink);
  font-weight: 500;
}
.lead-property.is-empty span {
  color: var(--ui-muted);
  font-weight: 400;
}
.lead-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ui-line);
}
.lead-details[hidden] {
  display: none;
}
#leadsContainer .lead-details .lead-edit-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#leadsContainer .lead-details .lead-edit-fields label,
.lead-field-label {
  display: block;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-muted);
}
#leadsContainer .lead-details .lead-edit-fields input {
  width: 100%;
  box-sizing: border-box;
}
#leadsContainer .lead-details .lead-edit-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
}
#leadsContainer .lead-details .lead-edit-actions button {
  width: auto;
}
.lead-info {
  margin: 10px 0 14px;
}
#leadsContainer .lead-details .lead-property-select {
  width: 100%;
  margin: 0 0 12px;
}
.lead-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
#leadsContainer .lead-controls .lead-status-select {
  flex: 1 1 180px;
  width: auto;
  margin: 0;
}
.lead-delete-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
@media (max-width: 700px) {
  #leadsContainer .lead-details .lead-edit-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .lead-delete-row .lead-delete-button {
    width: 100%;
  }
}

/* ---------- Handy: nichts darf breiter als der Bildschirm sein ---------- */
@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .content-grid > .panel {
    min-width: 0;
  }
}
@media (max-width: 650px) {
  nav.app-nav a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 650px) {
  .panel-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .panel-header > div {
    min-width: 0;
  }
}

/* Markierung "Quiere que le llamen" / "Prefiere WhatsApp" neben dem Namen */
#leadsContainer .lead-contact-heading {
  flex-wrap: wrap;
}
.contact-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.contact-tag svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-tag svg.icon-fill {
  fill: currentColor;
  stroke: none;
}
.contact-tag.is-call {
  background: #fff4d6;
  color: #7a5200;
}
.contact-tag.is-whatsapp {
  background: #dcf8e4;
  color: #11622f;
}
body[data-theme="dark"] .contact-tag.is-call {
  background: rgba(251, 191, 36, .16);
  color: #fcd34d;
}
body[data-theme="dark"] .contact-tag.is-whatsapp {
  background: rgba(74, 222, 128, .14);
  color: #86efac;
}

/* ---------- Leads: Button "Detalles" ---------- */
#leadsContainer .lead-item + .lead-item {
  margin-top: 6px;
}
#leadsContainer .lead-item:nth-child(odd) {
  border: 1px solid var(--ui-line);
}
body #leadsContainer .lead-item .lead-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0 auto;
  padding: 5px 10px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
body #leadsContainer .lead-item .lead-details-toggle:hover {
  background: var(--ui-surface-2);
}
.lead-details-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .15s ease;
}
.lead-details-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.lead-details-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lead-details-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ui-muted);
}
body #leadsContainer .lead-item.is-editing .lead-edit-icon {
  background: #34445e;
  box-shadow: 0 0 0 3px rgba(38, 52, 73, .25);
}
.lead-edit-panel {
  margin-bottom: 6px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
}
.lead-edit-panel[hidden],
.lead-delete-row[hidden] {
  display: none;
}

/* ---------- Notizen: Eingabe mit "Guardar nota" / "Cancelar" ---------- */
#leadsContainer .lead-note-form[hidden],
#leadsContainer .lead-note-new[hidden] {
  display: none;
}
#leadsContainer .lead-note-form {
  display: block;
}
#leadsContainer .lead-note-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.lead-note-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
#leadsContainer .lead-note-buttons .ui-btn {
  width: auto;
}
.lead-note-new {
  margin: 0 0 12px;
}
.note-list li > div {
  flex: 1;
  min-width: 0;
}
.note-list time {
  white-space: nowrap;
}
.lead-notes .media-count {
  white-space: nowrap;
}

/* Abstand zwischen "+ Agregar lead" und dem ersten Lead */
#leadsContainer {
  margin-top: 16px;
}

/* ---------- App installieren ---------- */
.install-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.install-section[hidden],
.install-help[hidden],
.install-banner[hidden] {
  display: none;
}
.settings-panel .install-button {
  width: 100%;
}
.install-help {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ui-muted);
}
.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-surface);
}
.install-banner img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ui-muted);
}
.install-banner-text strong {
  font-size: 14px;
  color: var(--ui-ink);
}
.install-banner .install-banner-close {
  position: static;
  background: transparent;
  box-shadow: none;
  color: var(--ui-muted);
  flex-shrink: 0;
}
.install-banner [hidden] {
  display: none;
}

/* ---------- Marke "AZUMI" ---------- */
.brand.brand-logo {
  display: block;
  margin-bottom: 26px;
}
.brand-logo img {
  display: block;
  height: 56px;
  width: auto;
}
.brand-logo .brand-on-dark,
body[data-theme="dark"] .brand-logo .brand-on-light {
  display: none;
}
body[data-theme="dark"] .brand-logo .brand-on-dark {
  display: block;
}
.sidebar-brand .sidebar-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
}
.by-line {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--ui-muted);
}
.by-line a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.by-line a:hover {
  text-decoration: underline;
}

/* ---------- Push-Benachrichtigungen (Zahnrad-Menü) ---------- */
.push-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.push-status {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ui-muted);
}
.push-actions {
  display: flex;
  gap: 6px;
}
.push-actions .ui-btn {
  flex: 1;
}
.push-actions .ui-btn[hidden] {
  display: none;
}

/* Kurzes Aufleuchten eines Leads (z. B. nach Tipp auf eine Benachrichtigung), sanft ausblenden */
#leadsContainer .lead-item {
  transition: background-color .5s ease, outline-color .5s ease;
}

/* ---------- Lead-Link: Leads pro Immobilie, Link für Social Media ---------- */
.prop-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.prop-leads-link,
.prop-leads {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 13px;
}
.prop-leads-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ui-accent);
  font-weight: 600;
  cursor: pointer;
}
.prop-leads-link:hover {
  text-decoration: underline;
}
.prop-leads.is-empty {
  color: var(--ui-muted);
}
.prop-leads-link svg,
.prop-leads svg,
.prop-copy-link svg,
.prop-text-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.prop-copy-link,
.prop-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-accent);
  cursor: pointer;
}
.prop-copy-link:hover:not(:disabled) span:first-of-type,
.prop-text-link:hover span:first-of-type {
  text-decoration: underline;
}
.prop-copy-link:disabled {
  color: var(--ui-muted);
  cursor: not-allowed;
}
.prop-copy-link.is-copied {
  color: var(--ui-green);
}
.prop-code {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ui-surface-2);
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.lead-link-block {
  margin: 0 0 18px;
  padding: 12px 14px 10px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface-2);
}
.lead-link-block > label {
  margin-top: 0;
}
.lead-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lead-link-prefix {
  font-size: 13px;
  color: var(--ui-muted);
  white-space: nowrap;
}
.lead-link-row[hidden] {
  display: none;
}
.lead-link-code {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}
.lead-link-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.lead-link-preview code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ui-ink);
}
.lead-link-preview code.is-placeholder {
  color: var(--ui-muted);
  font-family: inherit;
  white-space: normal;
}
.lead-link-preview .ui-btn {
  flex-shrink: 0;
}
.lead-link-hint {
  margin: 8px 0 0;
  font-size: 12px;
}

/* ---------- Merkmale im Immobilien-Formular / Portal-Hinweis ---------- */
.features-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ui-line);
}
.features-section > strong,
.features-section > span {
  display: block;
  margin-bottom: 8px;
}
.features-section > .muted,
.portal-hint {
  font-size: 12px;
  color: var(--ui-muted);
}
.portal-hint {
  margin: -4px 0 12px 26px;
}
.prop-meta {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ui-muted);
}
.portal-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ui-green-soft);
  color: var(--ui-green);
  font-size: 12px;
  font-weight: 700;
}

/* Flächen: Construcción / Terreno / Einheit */
.area-grid {
  grid-template-columns: 1fr 1fr 0.8fr;
}
.area-hint {
  margin: -4px 0 12px;
  font-size: 12px;
  color: var(--ui-muted);
}
@media (max-width: 600px) {
  .area-grid { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .area-grid > div:last-child { grid-column: 1 / -1; }
}
/* Auswahlfelder im Immobilien-Formular: gleicher Abstand und Hintergrund wie Textfelder */
#propertyForm select {
  display: block;
  margin-bottom: 14px;
  background-color: var(--ui-surface);
  color: var(--ui-ink);
}

/* Hinweis unter "Crear cuenta" */
.legal-consent {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ui-muted);
}
.legal-consent a { color: var(--ui-accent); }

/* Zahnrad-Menü: Konto / Passwort ändern */
.account-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.settings-panel .account-button {
  width: 100%;
}
.modal-card-small {
  max-width: 440px;
}
.form-success {
  min-height: 0;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-green);
}
.form-success:empty {
  display: none;
}

/* Login: "¿Olvidaste tu contraseña?" */
.forgot-link {
  margin: 0 0 14px;
  text-align: right;
  font-size: 13px;
}
.forgot-link a { color: var(--ui-accent); text-decoration: none; }
.forgot-link a:hover { text-decoration: underline; }

/* ---------- Texto para Facebook ---------- */
.fb-text-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.fb-text-lang button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-surface);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-muted);
  cursor: pointer;
}
.fb-text-lang button:hover {
  border-color: var(--ui-accent);
}
.fb-text-lang button .flag + .flag {
  margin-left: -3px;
}
.fb-text-lang button.active {
  border-color: var(--ui-accent);
  background: var(--ui-accent);
  color: var(--ui-surface);
}
.fb-text-area {
  width: 100%;
  min-height: 320px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.fb-text-hint {
  margin: 6px 0 4px;
  font-size: 12px;
}
#copyFacebookTextButton.is-copied {
  background: var(--ui-green);
  border-color: var(--ui-green);
}
.lead-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.facebook-badge {
  background: var(--ui-surface-2);
  color: var(--ui-accent);
}

/* Admin hat einen vierten Menüpunkt (Handy-Navigation unten) */
@media (max-width: 650px) {
  nav.app-nav.has-admin {
    grid-template-columns: repeat(4, 1fr);
  }
}
nav.app-nav a[hidden] {
  display: none !important;
}

/* ---------- Registrierung: Fangfeld gegen Bots, Häkchen "Soy asesor" ---------- */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.agent-check {
  align-items: flex-start;
  margin: 6px 0 12px;
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- Hinweis: E-Mail bestätigen ---------- */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-left: 4px solid var(--ui-accent);
  border-radius: 12px;
  background: var(--ui-surface);
}
.verify-banner[hidden] {
  display: none;
}
.verify-banner.is-done {
  border-left-color: var(--ui-green);
}
.verify-banner-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 14px;
}
.verify-banner-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-green);
}
@media (max-width: 650px) {
  .verify-banner {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Administración ---------- */
#adminView {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  padding: 34px;
}
#adminView .panel {
  max-width: 980px;
}
#adminView .panel-header {
  align-items: flex-start;
  gap: 16px;
}
.admin-kpis {
  max-width: 980px;
  margin: 0 0 18px;
}
.admin-agent {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.admin-agent.is-blocked {
  opacity: .7;
}
.admin-agent-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.admin-badges,
.admin-links,
.admin-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.admin-badges {
  gap: 6px;
}
.admin-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ui-surface-2);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-badge.is-ok {
  background: var(--ui-green-soft);
  color: var(--ui-green);
}
.admin-badge.is-warn {
  color: var(--ui-accent);
}
.admin-badge.is-blocked {
  background: var(--ui-red-soft);
  color: var(--ui-red);
}
.admin-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  color: var(--ui-accent);
  text-decoration: none;
  word-break: break-all;
}
.admin-links a:hover {
  text-decoration: underline;
}
.admin-links svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-links svg.icon-fill {
  fill: currentColor;
  stroke: none;
}
.admin-facts {
  font-size: 12px;
}
.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  #adminView {
    padding: 20px;
  }
  #adminView .panel-header {
    flex-wrap: wrap;
  }
  .admin-agent {
    flex-direction: column;
  }
  .admin-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ---------- Rechtliche Links (Aviso legal, Privacidad, Contacto) ---------- */
.mobile-legal,
.login-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 12px;
}
.mobile-legal a,
.login-legal a {
  color: var(--ui-muted);
  text-decoration: none;
}
.mobile-legal a:hover,
.login-legal a:hover {
  text-decoration: underline;
}
/* Seitenleiste: zwei Spalten, alles passt in die Breite */
.sidebar-legal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 16px;
  padding: 14px 4px 0;
  border-top: 1px solid #1f2a3c;
  font-size: 12px;
  line-height: 1.35;
}
.sidebar-legal a {
  min-width: 0;
  color: #94a3b8;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.sidebar-legal a:hover {
  color: #fff;
  text-decoration: underline;
}
.sidebar-legal .legal-by {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
}
.sidebar-legal .legal-by a {
  color: #94a3b8;
}

/* ---------- Seitenleiste (Computer): Configuración, Cerrar sesión und Links unten ---------- */
@media (min-width: 651px) {
  .dashboard .sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    box-sizing: border-box;
  }
  .settings-menu {
    position: relative;
    top: auto;
    right: auto;
    margin-top: auto;
    z-index: 60;
  }
  .settings-menu .settings-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #aeb7c6;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
  }
  .settings-menu .settings-button:hover,
  .settings-menu .settings-button.is-open {
    background: #1f2937;
    color: #fff;
  }
  .settings-menu .settings-button svg {
    width: 18px;
    height: 18px;
  }
  /* Menü öffnet sich rechts neben der Seitenleiste, unten ausgerichtet */
  .settings-panel {
    top: auto;
    right: auto;
    bottom: 0;
    left: calc(100% + 14px);
  }
  .sidebar .logout {
    margin-top: 8px;
  }
  /* Kein Platz mehr für das Zahnrad oben rechts nötig */
  .dashboard > .main,
  #leadsView,
  #excludedView,
  #adminView {
    padding-top: 34px;
  }
}
@media (max-width: 650px) {
  .settings-menu .settings-label {
    display: none;
  }
  .dashboard .sidebar .sidebar-legal {
    display: none;
  }
}

/* ---------- Titel/Beschreibung: Reihenfolge der Sprachen (Tausch-Knopf ⇄) ---------- */
.lang-blocks {
  display: flex;
  flex-direction: column;
}
.lang-swap-row {
  display: flex;
  justify-content: center;
  margin: 2px 0 10px;
}
.lang-swap svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Erste Sprache: Titel Pflicht (*); zweite Sprache: "(opcional)" */
.lang-block .optional-tag { display: none; }
.lang-block .required-star { color: var(--ui-red); }
.lang-block.is-secondary .optional-tag { display: inline; }
.lang-block.is-secondary .required-star { display: none; }

/* "Beide Sprachen": kleines ⇄ zeigt, dass ein weiterer Klick die Reihenfolge umkehrt */
.fb-text-lang .fb-swap-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

/* ---------- Übersetzen (zwischen den Sprachen) ---------- */
.lang-swap-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lang-translate svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-translate[hidden] {
  display: none;
}
.translate-status {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--ui-muted);
}
.translate-status:empty {
  display: none;
}

/* ---------- Fotos: hineinziehen und Reihenfolge ändern ---------- */
.prop-row.is-dropping {
  outline: 2px dashed var(--ui-accent);
  outline-offset: -4px;
  background: var(--ui-surface-2);
}
.media-grid.is-sorting {
  user-select: none;
}
.media-tile {
  touch-action: pan-y;
}
.media-tile.is-dragging {
  opacity: .45;
  transform: scale(.96);
}
.media-tile .drag-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .72);
  color: #fff;
  cursor: grab;
  touch-action: none;
}
.media-tile .drag-handle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.media-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ui-muted);
}
/* Mit Maus: ganzes Foto ziehbar, Griff nur beim Darüberfahren; Hinweis für Maus */
@media (hover: hover) and (pointer: fine) {
  .media-tile { cursor: grab; }
  .media-tile .drag-handle { opacity: 0; transition: opacity .15s ease; }
  .media-tile:hover .drag-handle { opacity: 1; }
  .media-hint-touch { display: none; }
}
/* Touch: Griff immer sichtbar, Hinweis für Touch */
@media (hover: none), (pointer: coarse) {
  .media-hint-mouse { display: none; }
}

/* ---------- Immobilien-Karte: Löschen nur als Mülleimer ---------- */
.ui-btn.ui-btn-icon {
  width: 38px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}

/* ---------- Immobilien-Karte am Handy: Bild oben über die ganze Breite ---------- */
@media (max-width: 700px) {
  .prop-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0 14px;
  }
  /* Titelbild als breiter Streifen (Mitte des Fotos), nicht in voller Höhe */
  .prop-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 2.4 / 1;
    border-radius: 0;
    border-bottom: 1px solid var(--ui-line);
  }
  .prop-thumb img {
    object-position: center;
  }
  .prop-thumb-empty svg {
    width: 34px;
    height: 34px;
  }
  .prop-info {
    padding: 12px 16px 0;
  }
  .prop-info h3 {
    white-space: normal;
    font-size: 17px;
  }
  .prop-price {
    padding: 8px 16px 0;
    font-size: 17px;
  }
  .prop-side {
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px 0;
  }
  /* Aktiv · Bearbeiten · Mülleimer in einer Reihe */
  .prop-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .prop-actions .ui-btn {
    height: 38px;
  }
  /* Links untereinander, linksbündig */
  .prop-side .prop-copy-link,
  .prop-side .prop-text-link {
    align-self: flex-start;
    padding: 2px 0;
    font-size: 14px;
  }
  .prop-row + .prop-row {
    border-top: 8px solid var(--ui-surface-2);
  }

  /* Fotos als Liste untereinander, rechts ein Griff über die ganze Höhe (wie eine Karteikarte) */
  .media-grid {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .media-tile {
    width: 100%;
    height: auto;
    aspect-ratio: 2.4 / 1;
    padding-right: 48px;
    background: var(--ui-surface);
    border: 1px solid var(--ui-line);
    box-sizing: border-box;
  }
  .media-tile img {
    border-radius: var(--ui-radius) 0 0 var(--ui-radius);
  }
  .media-tile .delete-media-button {
    right: 54px;
  }
  .media-tile figcaption {
    right: 48px;
  }
  .media-tile .drag-handle {
    top: 0;
    right: 0;
    bottom: 0;
    width: 48px;
    height: auto;
    border-radius: 0;
    background: var(--ui-surface-2);
    border-left: 1px solid var(--ui-line);
    color: var(--ui-muted);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .media-tile .drag-handle svg {
    width: 20px;
    height: 20px;
  }
  .media-tile.is-dragging {
    opacity: .6;
    transform: scale(.98);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .18);
  }
}
/* Schmale Bildschirme: immer den Hinweis für Touch zeigen */
@media (max-width: 700px) {
  .media-hint-mouse { display: none; }
  .media-hint-touch { display: inline; }
  .media-tile { aspect-ratio: 2.6 / 1; }
}

/* ---------- Handy: Inhalt über die ganze Breite (kein Rand links/rechts) ---------- */
@media (max-width: 700px) {
  html,
  body {
    overflow-x: hidden;
  }
  html body .dashboard > .main,
  html body #leadsView,
  html body #excludedView,
  html body #adminView {
    padding-left: 0;
    padding-right: 0;
  }
  /* Überschriften, Banner, Filter: etwas Abstand zum Rand behalten (Text nicht am Rand kleben) */
  :is(.dashboard > .main, #leadsView, #excludedView, #adminView) > :not(.panel):not(.content-grid):not(section.panel) {
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }
  :is(.dashboard > .main, #leadsView, #excludedView, #adminView) > .install-banner,
  :is(.dashboard > .main, #leadsView, #excludedView, #adminView) > .verify-banner {
    margin-left: 10px;
    margin-right: 10px;
  }
  .content-grid {
    gap: 10px;
  }
  /* Kästen ohne Rundung und ohne Rand links/rechts */
  html body .panel {
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
  }
  .panel > :not(.prop-list):not(#leadsContainer):not(#recentLeadsContainer):not(#excludedContainer):not(#adminContainer):not(#propertyContainer) {
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }
  #propertyContainer .prop-list,
  .prop-list {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  #propertyContainer .empty-state {
    margin: 0 14px;
  }
  /* Leads, Nummern, Admin: Karten über die ganze Breite */
  #leadsContainer .lead-item,
  #recentLeadsContainer .lead-item,
  #excludedContainer .lead-item,
  #adminContainer .lead-item {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 14px;
    padding-right: 14px;
  }
  /* Filter der Leads: nichts breiter als der Bildschirm */
  .leads-filters {
    flex-wrap: wrap;
  }
  .leads-filters .list-sort,
  .leads-filters .list-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .leads-filters select,
  .list-sort select {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
  .lead-email span,
  .lead-property span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
/* Navigation unten: alle Punkte passen in die Breite (auch mit "Admin") */
@media (max-width: 650px) {
  nav.app-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  nav.app-nav.has-admin {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  nav.app-nav a span {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
}
@media (max-width: 700px) {
  /* "Tu página pública": Kasten mit Abstand zum Rand */
  .panel > .public-page {
    padding: 12px 14px;
    margin-left: 14px;
    margin-right: 14px;
  }
  html body #leadsContainer .lead-item {
    border-left: 0;
    border-right: 0;
  }
}

/* ---------- Foto eines Leads ---------- */
.lead-photo {
  float: left;
  width: 64px;
  height: 64px;
  margin: 0 14px 6px 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ui-surface-2);
}
.lead-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.lead-item.has-photo .lead-details {
  clear: both;
}
.lead-photo-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.lead-photo-edit label.ui-btn {
  position: relative;
  overflow: hidden;
}
.lead-photo-edit input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.lead-photo-status {
  font-size: 12px;
  color: var(--ui-muted);
}
.lead-photo-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.lead-photo-pick img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
/* Handy: Foto über die ganze Breite der Karte, Ausschnitt aus der Mitte */
@media (max-width: 700px) {
  .lead-item.has-photo .lead-photo {
    float: none;
    width: auto;
    height: auto;
    aspect-ratio: 2.4 / 1;
    margin: -20px -14px 12px;
    border-radius: 0;
  }
}

/* ---------- "Escribir con IA": Beschreibung mit KI ---------- */
.lang-ai {
  color: var(--ui-accent);
}
.lang-ai[hidden] {
  display: none;
}
.lang-ai svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-ai.is-working svg {
  animation: ai-pulse 1s ease-in-out infinite;
}
@keyframes ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  .lang-ai.is-working svg { animation: none; }
}
.ai-undo {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}
.ai-undo[hidden] {
  display: none;
}

/* ---------- Immobilien-Formular: Speichern-Balken bleibt unten sichtbar ---------- */
#propertyModal .modal-card {
  padding-bottom: 0;
}
.property-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  align-items: center;
  margin: 20px -28px 0;
  padding: 12px 28px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--ui-surface);
  border-top: 1px solid var(--ui-line);
}
.property-actions .unsaved-hint {
  display: none;
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--ui-red);
}
.property-actions .unsaved-hint::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}
.property-actions.is-dirty .unsaved-hint {
  display: inline;
}

/* ---------- Handy: Fenster (Pop-ups) über den ganzen Bildschirm, ohne Rand ---------- */
@media (max-width: 700px) {
  .modal {
    padding: 0;
    align-items: stretch;
  }
  .modal-card:not(.modal-card-small) {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 16px 14px;
  }
  #propertyModal .modal-card {
    padding-bottom: 0;
  }
  .modal-card:not(.modal-card-small) .modal-header {
    margin-bottom: 16px;
  }
  .property-actions {
    margin: 16px -14px 0;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
  }
  .property-actions .unsaved-hint {
    flex-basis: 100%;
    margin: 0 0 2px;
  }
  .property-actions .ui-btn {
    flex: 1;
  }
  .modal-card-small {
    flex: 1 1 auto;
    width: auto;
    margin: auto 12px;
  }
}

/* ---------- Emojis für die Beschreibung ---------- */
.lang-block textarea {
  margin-bottom: 6px;
}
.desc-tools {
  margin: 0 0 14px;
}
.emoji-toggle {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.emoji-toggle .emoji-glyph {
  font-size: 15px;
  line-height: 1;
}
.emoji-toggle[aria-expanded="true"] {
  border-color: var(--ui-accent);
}
.emoji-panel {
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  background: var(--ui-surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.emoji-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
}
.emoji-group + .emoji-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--ui-line);
}
body[data-theme] .modal-card button.emoji-pick,
.emoji-pick {
  width: auto;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
body[data-theme] .modal-card button.emoji-pick:hover,
.emoji-pick:hover {
  background: var(--ui-surface-2);
}

/* ---------- "Fotos y PDF": Knopf im Blau des "Cerrar sesión"-Knopfs ---------- */
/* Gleiches Blau in der Liste und im Bearbeiten-Fenster; ID bzw. body-Selektor,
   damit die allgemeine Knopf-Farbe aus theme-light/theme-dark nicht greift. */
body .prop-row .prop-media-toggle,
body #propertyMediaLink {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 10px auto 12px;
  padding: 9px 18px;
  border: 0;
  border-radius: var(--ui-radius);
  background: #263449;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  transition: background .15s ease;
}
body .prop-row .prop-media-toggle:hover,
body #propertyMediaLink:hover {
  background: #34445e;
}
body .prop-row .prop-media-toggle:focus-visible,
body #propertyMediaLink:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
body .prop-row .prop-media-toggle svg,
body #propertyMediaLink svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body .prop-row .prop-media-toggle .media-count {
  margin-left: 2px;
  color: rgba(255, 255, 255, .75);
  font-weight: 500;
}
/* Nur der Pfeil dreht sich beim Aufklappen, nicht die Kamera */
body .prop-row .prop-media-toggle[aria-expanded="true"] svg:first-child {
  transform: none;
}
/* Im Bearbeiten-Fenster: etwas Abstand zu den Häkchen darüber */
body #propertyMediaLink {
  margin: 18px auto 6px;
  padding: 10px 22px;
  font-size: 15px;
}
body #propertyMediaLink.hidden {
  display: none;
}
/* Dunkles Design: etwas heller, damit sich der Knopf vom Hintergrund abhebt */
body[data-theme="dark"] .prop-row .prop-media-toggle,
body[data-theme="dark"] #propertyMediaLink {
  background: #34445e;
}
body[data-theme="dark"] .prop-row .prop-media-toggle:hover,
body[data-theme="dark"] #propertyMediaLink:hover {
  background: #415373;
}

/* ---------- Lead löschen: Mülleimer rechts neben "Detalles" ---------- */
body #leadsContainer .lead-item .lead-delete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  box-shadow: none;
  cursor: pointer;
}
body #leadsContainer .lead-item .lead-delete-icon:hover {
  color: var(--ui-red);
  border-color: var(--ui-red);
  background: var(--ui-red-soft);
}
body #leadsContainer .lead-item .lead-delete-icon:disabled {
  opacity: .5;
  cursor: default;
}
body #leadsContainer .lead-item .lead-delete-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Einheitliche Knopf-Farbe: ruhiges Blau wie "Cerrar sesión" ---------- */
/* Hauptknöpfe (Guardar, Agregar …) und alle übrigen gefüllten Knöpfe */
body .ui-btn-primary {
  background: #263449;
  color: #ffffff;
}
body .ui-btn-primary:hover:not(:disabled) {
  background: #34445e;
}
body[data-theme="light"] button:not(.secondary-button):not(.modal-close):not(.lead-cancel-button):not(.ui-btn):not(.ui-icon-btn):not(.bot-toggle):not(.media-toggle):not(.logout):not(.recent-lead-link):not(.prop-leads-link):not(.prop-copy-link):not(.prop-text-link):not([data-fb-lang]):not(.emoji-pick):not(.lead-delete-icon):not(.lead-details-toggle):not(.lead-edit-icon):hover:not(:disabled) {
  background-color: #34445e;
  opacity: 1;
}
/* Dunkles Design: etwas heller, damit sich die Knöpfe vom Hintergrund abheben */
body[data-theme="dark"] .ui-btn-primary {
  background: #34445e;
  color: #ffffff;
}
body[data-theme="dark"] .ui-btn-primary:hover:not(:disabled) {
  background: #415373;
}
body[data-theme="dark"] button:not(.secondary-button):not(.modal-close):not(.lead-cancel-button):not(.ui-btn):not(.ui-icon-btn):not(.bot-toggle):not(.media-toggle):not(.logout):not(.recent-lead-link):not(.prop-leads-link):not(.prop-copy-link):not(.prop-text-link):not([data-fb-lang]):not(.emoji-pick):not(.lead-delete-icon):not(.lead-details-toggle):not(.lead-edit-icon):hover:not(:disabled) {
  background: #415373;
  opacity: 1;
}
