/* =============================================================================
 * Anpassungen an die serverseitig gerenderte Fassung
 * =============================================================================
 * app.css ist eine unveraenderte Kopie des Prototyp-Stylesheets, damit sie
 * sich neu ziehen laesst, wenn sich am Prototyp etwas aendert. Die wenigen
 * noetigen Korrekturen stehen deshalb hier statt dort.
 *
 * Zwei Ursachen:
 *   1. Der Prototyp ist eine einzige Seite und blendet Bereiche per
 *      JavaScript ein und aus (display:none als Ausgangszustand). Hier ist
 *      jede Seite ein eigenes Dokument — was ausgeliefert wird, ist sichtbar.
 *   2. Die 36px Abstand oben waren Platz fuer die Dev-Toolbar. Die gibt es
 *      im Livesystem nicht.
 * ============================================================================= */

.app,
.auth-screen {
  margin-top: 0;
  min-height: 100vh;
}

.app { display: grid; }

.sidebar { top: 0; }

/* Jede Seite ist ein eigenes Dokument — kein Umschalten zur Laufzeit. */
.page { display: block; }

/* Die beiden Schritte der Anmeldung bleiben ein Umschaltvorgang:
   E-Mail-Eingabe und Code-Eingabe liegen auf derselben Seite. */
.auth-form { display: none; }
.auth-form.active { display: block; }

/* Der Prototyp zeigt die TAN in einer orangen Box im UI an. Hier nur
   ausserhalb von Produktion, und der Server liefert sie nur dann. */
.demo-tan-box { display: none; }
.demo-tan-box.visible { display: block; }

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--red);
}

/* Der Prototyp setzt .nav-user direkt ins aside; mit flex rutscht es nach
   unten, ohne dass ein zusaetzlicher Behaelter noetig ist. */
.sidebar { display: flex; flex-direction: column; }
.nav-user { margin-top: auto; }

/* Eintraege fuer Bausteine, die es noch nicht gibt. Sichtbar, damit die
   Navigation wiedererkennbar bleibt — aber erkennbar nicht anklickbar. */
.nav-item-gesperrt {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.nav-item-gesperrt svg { opacity: 0.7; }

.nav-bald {
  margin-left: auto;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
}

.nav-extern-pfeil { margin-left: auto; opacity: 0.5; flex-shrink: 0; }

/* -----------------------------------------------------------------------------
 * Aus Inline-Stilen des Prototyps hervorgegangene Klassen
 * -----------------------------------------------------------------------------
 * Der Prototyp setzt an diesen Stellen style="..." direkt ins Markup. Die
 * Werte sind unveraendert uebernommen, nur benannt. Grund: Inline-Stile
 * vertragen sich schlecht mit einer Content-Security-Policy, und derselbe
 * Baustein taucht mehrfach auf.
 * -------------------------------------------------------------------------- */

.auth-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

.auth-note {
  background: var(--blue-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #1e3a8a;
  line-height: 1.5;
}
/* Nur das direkte Kind: ein <strong> INNERHALB der Zeile — etwa um eine
   E-Mail-Adresse — soll im Textfluss bleiben und keine eigene Zeile bekommen. */
.auth-note > strong { display: block; margin-bottom: 3px; }

.auth-note-success {
  background: var(--green-soft);
  color: #14532d;
}

/* Sechsstelliger Code: gesperrt gesetzt, damit man beim Abtippen die
   Stelle nicht verliert. */
.tan-input {
  text-align: center;
  font-size: 24px;
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: 0.25em;
  font-weight: 500;
}

.demo-tan-box {
  font-size: 11.5px;
  color: var(--accent);
  margin-top: 8px;
  text-align: center;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: 8px;
}

.demo-tan-code {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.label-optional {
  color: var(--muted);
  font-weight: 400;
}

/* -----------------------------------------------------------------------------
 * Neue Bausteine fuer die serverseitigen Ansichten
 * -----------------------------------------------------------------------------
 * Der Prototyp baut seinen Admin-Bereich fast vollstaendig mit
 * style-Attributen im generierten Markup (renderBankshopAdmin, Z. 8005 ff.).
 * Als wiederverwendbare Klassen geschrieben, in derselben Formensprache:
 * dieselben Variablen, dieselben Radien, dieselbe Typografie.
 * -------------------------------------------------------------------------- */

/* ---------- Status-Pillen ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bg-soft);
  color: var(--muted);
}
.pill-green { background: var(--green-soft); color: #14532d; }
.pill-amber { background: var(--amber-soft); color: #78350f; }
.pill-red   { background: var(--red-soft);   color: #991b1b; }

/* ---------- Reiter im Admin ---------- */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--white);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all .2s ease;
}
.admin-tab:hover { background: var(--bg-soft); }
.admin-tab.active { background: var(--ink); color: var(--white); }
.admin-tab-count {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .07);
}
.admin-tab.active .admin-tab-count { background: rgba(255, 255, 255, .18); }

/* ---------- Partnerliste ---------- */
.partner-list { display: flex; flex-direction: column; gap: 12px; }

.partner-row { margin-bottom: 0; padding: 20px 24px; }

.partner-row-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.partner-row-main { min-width: 0; }
.partner-row-name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 3px;
}
.partner-row-meta {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.partner-row-meta a { color: var(--accent); text-decoration: none; }
.partner-row-meta a:hover { text-decoration: underline; }

.partner-row-side { text-align: right; }
.partner-row-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
}

.partner-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.partner-note {
  flex: 1 1 220px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}

/* ---------- Datenliste (Kontoübersicht) ---------- */
.data-list { display: grid; gap: 1px; background: var(--line-soft); border-radius: 10px; overflow: hidden; }
.data-list > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 14px;
  background: var(--white);
  font-size: 13.5px;
}
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; overflow-wrap: anywhere; }
.data-list code {
  font-size: 12.5px;
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 5px;
}

/* ---------- Ausbaustand ---------- */
.roadmap { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.roadmap li {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .partner-row-head { grid-template-columns: 34px minmax(0, 1fr); }
  .partner-row-side { grid-column: 2; text-align: left; }
  .data-list > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Fehlerseite ---------- */
.error-screen { grid-template-columns: 1fr; background: var(--white); }
.error-code {
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

/* Erklaerender Text unter einem Eingabefeld. Im Prototyp ein
   style-Attribut (Z. 1881). */
.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.auth-hint-legal { font-size: 11px; margin-top: 14px; }
.auth-hint a { color: var(--accent); }

/* Feld, das die Pruefung nicht bestanden hat. */
.has-error {
  border-color: var(--red) !important;
  background: var(--red-soft);
}

/* ---------- Baustein 2: Finanzierungsrechner ---------- */
.rechner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.rechner-card { margin-bottom: 0; display: flex; flex-direction: column; }
.rechner-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.rechner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Der fertige Link — umbrechend, damit ein langer Link den Dialog nicht sprengt. */
.share-link {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  max-height: 90px;
  overflow-y: auto;
  color: var(--ink);
}

.qr-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 16px;
}
.qr-box svg { width: 220px; height: 220px; }

.share-mailform {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

/* Warnhinweis — das Gegenstück zu .auth-note-success. */
.auth-note-warn { background: var(--amber-soft); color: #78350f; }
.auth-note-warn a { color: #78350f; }

/* Gespeichertes Feld im Admin — bleibt sichtbar, bis erneut getippt wird. */
.ist-gespeichert {
  border-color: var(--green) !important;
  background: var(--green-soft);
}
.feld-gespeichert {
  font-size: 11.5px;
  font-weight: 600;
  color: #14532d;
  white-space: nowrap;
}

/* =============================================================================
 * Öffentliche Partnerseite (Baustein 1)
 * =============================================================================
 * Im Prototyp vollstaendig mit style-Attributen im generierten Markup
 * (renderPublicPartnerPage). Hier als Klassen — Werte unveraendert.
 * ========================================================================== */

.pp-seite {
  min-height: 100vh;
  background: var(--bg-soft);
  padding: 48px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pp-karte {
  background: var(--white);
  border-radius: 22px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .04);
  width: 100%;
  max-width: 720px;
}

.pp-leer { text-align: center; padding: 64px 40px; }
.pp-leer .pp-funktion { margin-top: 10px; }

.pp-kopf {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.pp-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink), #1e3a5f);
  display: grid;
  place-items: center;
  color: var(--white);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  flex-shrink: 0;
  text-transform: uppercase;
}

.pp-kopf-text { flex: 1; min-width: 240px; }

.pp-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.pp-name {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 6px;
  text-wrap: balance;
}

.pp-funktion { color: var(--ink-soft); font-size: 14px; }
.pp-funktion a { color: var(--accent); }

.pp-verifiziert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  padding: 8px 14px;
  border-radius: 999px;
  color: #166534;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.pp-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: 14px;
  border-left: 4px solid var(--accent);
}

.pp-kontakt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.pp-kontakt-feld {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease;
  min-width: 0;
}
.pp-kontakt-feld:hover { transform: translateY(-2px); }

.pp-kontakt-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.pp-kontakt-wert {
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.pp-block { margin-bottom: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.pp-block-grau {
  padding: 18px 20px;
  background: var(--bg-soft);
  border-radius: 12px;
  border-top: 0;
}

.pp-block-titel {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.pp-block-text { font-size: 14px; line-height: 1.7; }

.pp-fuss {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 560px) {
  .pp-karte { padding: 26px 20px; }
  .pp-name { font-size: 26px; }
  .pp-verifiziert { order: -1; }
}

/* ---------- Dashboard: Module ohne Backend ---------- */
.module-gesperrt { opacity: 0.62; }

.module-platzhalter {
  background: var(--bg-soft);
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
  padding: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.module-platzhalter strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Die Prototyp-Vorlage faerbt diesen Pfeil per style-Attribut. */
.calc-row-pfeil { color: var(--accent); flex-shrink: 0; }

.module-hinweis {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 10px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Im Prototyp fehlen die Farbvarianten fuer Baustein 3 und 4. */
.tag-bv         { background: var(--blue-soft);  color: #1e3a8a; }
.tag-marktplatz { background: var(--green-soft); color: #14532d; }
.module-icon-bg.bv         { background: var(--blue); }
.module-icon-bg.marktplatz { background: var(--green); }

/* ---------- Topbar ---------- */
/* Die Glocke ist noch ohne Funktion — erkennbar, aber nicht anklickbar. */
.topbar-icon-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

/* Im Prototyp sind calc-row und profile-mini-url <div>-Elemente mit onclick.
   Hier sind es echte Links — die brauchen den Unterstrich abgeschaltet. */
a.calc-row,
a.profile-mini-url {
  text-decoration: none;
  color: inherit;
}

/* ---------- Ablageflaeche fuer Dateien ----------------------------------
   Der Prototyp verwendet .upload-zone mit Symbol, Titel und Hinweis, definiert
   die Klasse aber nirgends. Hier vorbereitet fuer Exposé und Objektbilder
   (Baustein 3) und Match-Fotos (Baustein 4).

   Fuer das Ziehen und Ablegen dort beachten: Firefox meldet beim Ziehen ueber
   Text einen Textknoten als Ziel, kein Element — closest() gibt es darauf
   nicht. Das Ziel also vorher auf das Elternelement aufloesen. */
.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 150px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-soft);
  /* Deutlich dunkler als --line: der Rahmen muss auf weissem Grund als
     Ablagefläche erkennbar sein, nicht nur zu erahnen. */
  border: 2px dashed #bdb5a4;
  border-radius: 14px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.upload-zone:hover { border-color: var(--ink-soft); }

.upload-zone.ziel-aktiv {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  transform: scale(1.01);
}

.upload-zone.laedt { opacity: 0.6; pointer-events: none; }

.upload-zone-icon {
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 0;
}
.upload-zone.ziel-aktiv .upload-zone-icon { color: var(--accent); }

.upload-zone-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.upload-zone-hint  { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* Das Dateifeld unsichtbar, aber fokussierbar — display:none naehme es aus der
   Tab-Reihenfolge. Die Flaeche zeigt den Fokus stattdessen. */
.upload-zone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.upload-zone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}



/* =============================================================================
 * Baustein 4 — Immobilien-Match
 * =============================================================================
 * Die Karten (.mp-card, .mp-grid, .mp-kind-pill …) kommen aus dem
 * uebernommenen Stylesheet. Hier nur, was der Prototyp per style-Attribut
 * setzt — Werte unveraendert.
 * ========================================================================== */

/* Pulsierender "aktiv"-Punkt ueber dem Seitentitel */
.mp-aktiv-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #14532d;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.mp-aktiv-punkt {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: mp-puls 2s infinite;
}
@keyframes mp-puls {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-aktiv-punkt { animation: none; }
}

/* Reiter */
.mp-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--white);
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.mp-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.mp-tab.active { background: var(--ink); color: var(--white); }
.mp-tab-gesperrt { opacity: 0.5; }

.mp-info { margin-bottom: 20px; }
.mp-info strong { display: block; margin-bottom: 2px; }

/* Leerer Zustand */
.mp-leer {
  background: linear-gradient(135deg, var(--green-soft) 0%, var(--white) 60%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 44px 30px;
  text-align: center;
}
.mp-leer-icon {
  width: 64px;
  height: 64px;
  background: var(--green);
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--white);
}
.mp-leer-titel {
  font-size: 22px;
  margin-bottom: 8px;
  color: #14532d;
  font-weight: 500;
}
.mp-leer-text {
  font-size: 14px;
  color: #166534;
  margin: 0 auto 22px;
  line-height: 1.6;
  max-width: 480px;
}
.mp-leer-hinweis { font-size: 11.5px; color: var(--muted); margin-top: 20px; }

/* Karten als Knoepfe: klickbar und per Tastatur erreichbar. Die Grundwerte
   eines <button> muessen dafuer zurueckgesetzt werden. */
button.mp-card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button.mp-card:hover { border-color: var(--ink-soft); }
button.mp-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.mp-photos { margin-bottom: 14px; border-radius: 16px 16px 0 0; }
.mp-photos img {
  flex: 1;
  min-width: 0;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-card-partner-text { flex: 1; min-width: 0; }
.mp-card-partner-name { font-weight: 500; color: var(--ink); font-size: 12.5px; }
.mp-card-partner-rolle {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-card-rest { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Formular */
.mp-modal { max-width: 720px; }

.mp-kind-wahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-kind-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px;
  border: 2px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.mp-kind-option-titel { font-size: 16px; font-weight: 500; }
.mp-kind-option-text  { font-size: 11.5px; color: var(--muted); }

.mp-kind-option.angebot.selected { border-color: var(--green); background: var(--green-soft); color: #166534; }
.mp-kind-option.gesuch.selected  { border-color: var(--blue);  background: var(--blue-soft);  color: #1e3a8a; }
.mp-kind-option.selected .mp-kind-option-text { color: inherit; }
.mp-kind-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.upload-zone-kompakt { min-height: 110px; padding: 16px; }
.upload-zone-voll { opacity: 0.45; pointer-events: none; }

.mp-foto-liste {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.mp-foto {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.mp-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-foto-weg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(14, 31, 58, .75);
  color: var(--white);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.mp-foto-weg:hover { background: var(--red); }
.mp-foto-neu {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  background: var(--accent);
  color: var(--white);
  padding: 1px 5px;
  border-radius: 4px;
}

.mp-form-hinweis {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.mp-form-hinweis strong { color: var(--ink-soft); }

.mp-modal-footer { align-items: center; }
.mp-footer-luecke { flex: 1; }

@media (max-width: 560px) {
  .mp-kind-wahl { grid-template-columns: 1fr; }
}

/* ---------- Immobilien-Match: Treffer ----------------------------------
   Aus renderMatchCard (Prototyp Z. 13190 ff.), dort per style-Attribut. */

/* Reiter sind jetzt Links */
a.mp-tab { text-decoration: none; }
a.mp-tab:not(.active):hover { background: var(--bg-soft); }
.mp-tab-zahl {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
}

.nav-badge-gruen { background: var(--green); }

.mt-leer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 44px 30px;
  text-align: center;
}
.mt-leer-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-soft);
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mt-leer-titel { font-size: 20px; margin-bottom: 8px; color: var(--ink); font-weight: 500; }
.mt-leer-text  { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 460px; margin: 0 auto; }

.mt-liste { display: flex; flex-direction: column; gap: 12px; }

.mt-karte {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.mt-karte.mt-bestaetigt { border-left: 4px solid var(--green); }

.mt-kopf {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.mt-inhalt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.mt-inhalt.mt-mit-foto { grid-template-columns: 96px minmax(0, 1fr) auto; }

.mt-foto {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-soft);
  display: block;
}

.mt-text { min-width: 0; }
.mt-titelzeile { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.mt-art { font-size: 15px; }
.mt-titel { font-size: 17px; font-weight: 500; color: var(--ink); }
.mt-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.mt-beschreibung { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; overflow-wrap: anywhere; }
.mt-von { font-size: 11.5px; color: var(--muted); }
.mt-von strong { color: var(--ink); }

.mt-status {
  flex-shrink: 0;
  margin-top: 2px;
}
.mt-pill {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}
.mt-pill-bestaetigt { background: var(--green); color: var(--white); font-weight: 600; }
.mt-pill-verworfen  { background: var(--bg-soft); color: var(--muted); }
.mt-pill-wartet     { background: var(--amber-soft); color: #78350f; }
.mt-pill-anfrage    { background: var(--blue-soft); color: #1e3a5f; }
.mt-pill-neu        { background: var(--green-soft); color: #14532d; }

.mt-aktionen { display: flex; gap: 8px; margin-top: 12px; }
.mt-ja { flex: 1; justify-content: center; }

.mt-kontakt {
  background: var(--green-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
}
.mt-kontakt-titel {
  font-size: 11px;
  color: #14532d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 8px;
}
.mt-kontakt-daten { font-size: 13px; color: #14532d; line-height: 1.7; }
.mt-kontakt-daten a { color: #14532d; }

@media (max-width: 640px) {
  .mt-inhalt,
  .mt-inhalt.mt-mit-foto { grid-template-columns: minmax(0, 1fr); }
  .mt-aktionen { flex-direction: column; }
}

/* Dashboard: die zwei besten Treffer */
.mt-dash-titel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 8px;
}
.mt-dash-liste { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.mt-dash-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}
.mt-dash-zeile:hover { background: var(--green-soft); }
.mt-dash-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mt-dash-name { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-dash-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-dash-pill {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
}
.mt-dash-bestaetigt, .mt-dash-neu { background: var(--green); }
.mt-dash-wartet  { background: var(--amber); }
.mt-dash-anfrage { background: var(--blue); }

/* ---------- Immobilien-Match: Archiv (renderMpArchive) ---------- */
.mp-tab-zahl.mp-tab-zahl-grau { background: var(--muted); }

.ar-leer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 30px;
  text-align: center;
}
.ar-leer-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-soft);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 26px;
}
.ar-leer-titel { font-size: 18px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.ar-leer-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto;
}

.ar-hinweis {
  background: var(--bg-soft);
  border-left: 4px solid var(--muted);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.mp-card.ar-karte { opacity: 0.75; cursor: default; }
.mp-card.ar-karte:hover { opacity: 1; }
.ar-status {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--white);
  font-weight: 500;
}
.ar-status.ar-status-erledigt { background: var(--green); }
.ar-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.ar-fuss {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  display: grid;
  gap: 3px;
}
.ar-fuss strong { color: var(--ink-soft); }
.ar-verlaengern { margin-top: 12px; }
