/* Objektliste — Handy zuerst. Farben kommen aus den --fa-*-Variablen der Shell. */

.obj-steuerung { display: grid; gap: 10px; margin-bottom: 14px; }

.obj-radius { display: flex; gap: 0; border: 1px solid var(--fa-border); border-radius: 10px; overflow: hidden; }
.obj-radius button {
  flex: 1; background: #fff; border: 0; border-right: 1px solid var(--fa-border);
  padding: 10px 0; font: inherit; font-size: 14px; color: var(--fa-muted); cursor: pointer;
}
.obj-radius button:last-child { border-right: 0; }
.obj-radius button[aria-pressed="true"] { background: var(--fa-cyan); color: #fff; font-weight: 600; }

.obj-aktion {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: #fff; border: 1px solid var(--fa-border); border-radius: 12px;
  padding: 14px 16px; font: inherit; font-size: 15px; font-weight: 600;
  color: var(--fa-text); cursor: pointer; text-align: left;
}
.obj-aktion:active { background: #f0f6fa; }
.obj-aktion .ico { font-size: 18px; line-height: 1; }

/* Status: Spinner, Fehler, Zusammenfassung ---------------------------- */
.obj-status { font-size: 13px; color: var(--fa-muted); margin-bottom: 12px; line-height: 1.5; }
.obj-status.obj-fehler {
  background: #fdecea; border: 1px solid #f5c6c2; border-radius: 10px;
  padding: 12px 14px; color: var(--fa-error);
}
.obj-status.obj-fehler p { margin: 0 0 10px; }
.obj-status.obj-fehler button {
  background: var(--fa-error); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer;
}

.obj-spinner {
  display: inline-block; width: 13px; height: 13px; vertical-align: -2px;
  border: 2px solid var(--fa-border); border-top-color: var(--fa-cyan);
  border-radius: 50%; animation: obj-dreh .8s linear infinite;
}
@keyframes obj-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .obj-spinner { animation-duration: 2.4s; } }

.obj-zusammenfassung { display: flex; align-items: center; gap: 10px; }
.obj-zusammenfassung span { flex: 1; }
.obj-zusammenfassung b { color: var(--fa-text); }
.obj-zusammenfassung button {
  background: none; border: 1px solid var(--fa-border); border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 12px; color: var(--fa-cyan-dark);
  cursor: pointer; white-space: nowrap;
}
.obj-genauigkeit { font-size: 11px; margin-top: 4px; }

/* Karte --------------------------------------------------------------- */
.obj-karte {
  height: 260px; border: 1px solid var(--fa-border); border-radius: 12px;
  overflow: hidden; margin-bottom: 12px;
}
/* Landeskarte etwas zuruecknehmen, damit die Marker vorne stehen — gleiche
   Behandlung wie im Cockpit. */
.obj-karte .leaflet-tile-pane { filter: saturate(.3) brightness(1.05); }

/* Trefferliste -------------------------------------------------------- */
.obj-zeile {
  background: #fff; border: 1px solid var(--fa-border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.obj-kopf { display: flex; align-items: baseline; gap: 10px; }
.obj-titel { flex: 1; font-weight: 600; font-size: 15px; line-height: 1.35; }
.obj-km { font-size: 13px; font-weight: 700; color: var(--fa-cyan-dark); white-space: nowrap; }
.obj-unterzeile { font-size: 13px; color: var(--fa-muted); margin-top: 3px; }
.obj-meta { font-size: 12px; color: var(--fa-muted); margin-top: 4px; }

.obj-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eef2f5; color: var(--fa-muted);
}
.chip-auftrag { background: #e3f4e6; color: #1e6b28; }
.chip-offerte { background: #fdf0d8; color: #8a5b00; }
.chip-submission { background: #e8eef3; color: var(--fa-muted); }
.chip-tage { background: #e4f3fa; color: var(--fa-cyan-dark); font-weight: 600; }

/* Aktionszeile pro Treffer --------------------------------------------- */
.obj-aktionen { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--fa-border); }
.obj-link {
  background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--fa-cyan-dark); cursor: pointer;
}
.obj-link:active { opacity: .6; }

/* Objektpicker und «Zuletzt geöffnet» ---------------------------------- */
/* Bewusst dieselbe Kartenform wie .obj-aktion oben: 12px Radius,
   14px/16px Innenabstand, 15px Schrift. Der ganze Block soll wie eine Liste
   gleichwertiger Knöpfe wirken, nicht wie drei verschiedene Bauteile. */
.obj-suche { margin-bottom: 14px; }
.obj-titel-klein { font-size: 12px; color: var(--fa-muted); margin: 0 0 8px; }

.obj-label { display: block; }
.obj-label input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 14px 16px; font: inherit; font-size: 16px;   /* 16px: iOS zoomt sonst */
  border: 1px solid var(--fa-border); border-radius: 12px;
  background: #fff; color: var(--fa-text);
}
.obj-label input::placeholder { color: var(--fa-muted); opacity: .75; }
.obj-label input:focus { outline: 2px solid var(--fa-cyan); outline-offset: -1px; }

.obj-letzte { margin-bottom: 14px; }
.obj-letzte-titel { font-size: 12px; color: var(--fa-muted); margin: 0 0 8px; }
.obj-letzte-zeile {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--fa-border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; font: inherit; color: var(--fa-text);
  cursor: pointer;
}
.obj-letzte-zeile:active { background: #f0f6fa; }
.obj-letzte-nr { flex: 0 0 auto; font-size: 15px; font-weight: 600; }
.obj-letzte-bez { flex: 1; min-width: 0; font-size: 14px; color: var(--fa-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-letzte-pfeil { flex: 0 0 auto; color: var(--fa-muted); font-size: 16px; }

/* «Alle N anzeigen» am Ende einer gekürzten Trefferliste ---------------- */
.obj-mehr {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  background: #fff; border: 1px dashed var(--fa-border); border-radius: 12px;
  padding: 13px 16px; margin-top: 2px; font: inherit; font-size: 14px;
  font-weight: 600; color: var(--fa-cyan-dark); cursor: pointer;
}
.obj-mehr:active { background: #f0f6fa; }
.obj-mehr small { display: block; font-size: 11px; font-weight: 500; color: var(--fa-muted); margin-top: 2px; }

/* Detailansicht eines Objekts ------------------------------------------ */
.det-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.det-zurueck {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  background: #fff; border: 1px solid var(--fa-border); font-size: 17px;
  color: var(--fa-muted); cursor: pointer; line-height: 1;
}
.det-titel { min-width: 0; }
.det-nr { font-weight: 700; font-size: 17px; line-height: 1.2; }
.det-bez { font-size: 13px; color: var(--fa-muted); line-height: 1.35; margin-top: 2px; }

.det-chips { margin-bottom: 14px; }

.det-block {
  background: #fff; border: 1px solid var(--fa-border); border-radius: 12px;
  padding: 4px 16px; margin-bottom: 12px;
}
.det-zeile {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--fa-border);
}
.det-zeile:last-child { border-bottom: 0; }
.det-label { flex: 0 0 40%; font-size: 12px; color: var(--fa-muted); }
.det-wert { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }

.det-aktionen { display: grid; gap: 10px; margin-bottom: 12px; }
.det-aktionen .obj-aktion { text-decoration: none; }

.det-abschnitt { font-size: 12px; color: var(--fa-muted); padding: 12px 0 8px; }
.det-platz {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--fa-border);
}
.det-platz-code { font-weight: 600; font-size: 14px; }
.det-platz-ort { flex: 1; min-width: 0; font-size: 13px; color: var(--fa-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.det-leer, .det-fuss { font-size: 12px; color: var(--fa-muted); padding: 10px 0 12px; line-height: 1.5; }
.det-fuss { border-top: 1px solid var(--fa-border); }

/* Titel der Trefferkarte ist jetzt ein Knopf -------------------------- */
.obj-titel {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px;
  background: none; border: 0; padding: 0; margin: 0; text-align: left;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.35;
  color: var(--fa-text); cursor: pointer;
}
.obj-titel:active { color: var(--fa-cyan-dark); }
.obj-chev { flex: 0 0 auto; color: var(--fa-muted); font-size: 15px; font-weight: 400; }

/* Installationsplatz-Zeile im Detail ist antippbar --------------------- */
.det-platz {
  width: 100%; box-sizing: border-box; background: none; border: 0;
  border-top: 1px solid var(--fa-border); padding: 12px 0; margin: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.det-platz:active { background: #f0f6fa; }
.det-platz-pfeil { flex: 0 0 auto; color: var(--fa-muted); font-size: 15px; }

/* «+ Installationsplatz anlegen» im Detailblock ------------------------ */
.det-neu {
  width: 100%; box-sizing: border-box; background: none;
  border: 0; border-top: 1px solid var(--fa-border);
  padding: 13px 0 12px; margin: 0; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--fa-cyan-dark); cursor: pointer; text-align: left;
}
.det-neu:active { opacity: .6; }
