/* ============================================================
   VenAyuda – Styles (mobile-first)
   ============================================================ */
:root {
  --blue: #0a3d62;
  --blue-2: #1e6091;
  --yellow: #f6c700;
  --red: #c0392b;
  --green: #1e8449;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1c2833;
  --muted: #6b7785;
  --line: #e3e8ee;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 32, 48, 0.08), 0 4px 12px rgba(16, 32, 48, 0.05);
}

* { box-sizing: border-box; }
/* Sorgt dafür, dass das hidden-Attribut IMMER versteckt – auch bei display:flex/grid */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  /* Platz für die fixierte bottomnav INKL. Safe-Area (iPhone-Home-Indicator),
     sonst verdeckt die Navigation den Footer. */
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  /* Footer immer unten halten – auch auf kurzen Seiten (z. B. Mascotas) */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
#app.container { flex: 1 0 auto; width: 100%; }
.footer { flex-shrink: 0; }

/* ---- Horizontales Überlaufen verhindern (immer auf Smartphone-Breite) ---- */
/* overflow-x: clip bricht – anders als hidden – position:sticky NICHT. */
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video, canvas, iframe { max-width: 100%; }
/* Bilder in Berichten zentriert (renderMd wrappt sie in <figure>) */
figure { margin: 1.75rem auto; text-align: center; max-width: 100%; }
figure img { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 6px; }
figcaption { margin-top: .5rem; font-size: .85em; line-height: 1.4; opacity: .75; text-align: center; }
.map, .item-foto, .mc-foto { max-width: 100%; }
/* Lange, ununterbrochene Texte (URLs, IDs, Namen) umbrechen statt überlaufen */
.view-title, .intro, .item, .card, .item-line, .item-head strong, .emerg-name,
.mc-ptitle, .mc-desc, .mc-line, .asis-result, .avisos-sub, p, h1, h2 {
  overflow-wrap: break-word; word-break: break-word;
}
/* Flex-Kinder dürfen schrumpfen, sonst schieben lange Inhalte die Breite */
.item-head, .item-head strong, .emerg-item, .emerg-info, .mc-pinfo, .searchbar { min-width: 0; }
.segmented { flex-wrap: wrap; }

/* ---- Topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--blue);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-logo { border-radius: 8px; background: #fff; }
.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: min(58vw, 240px);
  display: block;
  /* Weißer Schein, damit das Logo auf dunklem Header lesbar bleibt */
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
}
@media (max-width: 360px) {
  .brand-logo-img { height: 32px; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.2px; }
.brand-tag { font-size: 0.72rem; opacity: 0.85; }
.lang-toggle {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.lang-toggle:active { transform: scale(0.96); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.platforms-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.platforms-btn:active { transform: scale(0.96); }
.home-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.95rem;
  cursor: pointer;
  line-height: 1;
}
.home-btn:active { transform: scale(0.96); }
@media (max-width: 430px) { .platforms-btn-lbl { display: none; } }

/* ---- Banner ---- */
.fraud-banner {
  background: #fff8e1;
  color: #7a5c00;
  border-bottom: 1px solid #f0e0a0;
  font-size: 0.84rem;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fraud-text { flex: 1; text-align: left; }
.fraud-ok {
  flex: 0 0 auto;
  background: #7a5c00;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}
.fraud-ok:active { transform: scale(0.96); }
.demo-banner {
  background: #eef4ff;
  color: var(--blue-2);
  border-bottom: 1px solid #d4e2f7;
  font-size: 0.8rem;
  padding: 7px 14px;
  text-align: center;
}
.demo-banner.warn {
  background: #fdecea;
  color: var(--red);
  border-bottom-color: #f5c6c0;
  font-weight: 600;
}

/* ---- Container ---- */
.container { max-width: 720px; margin: 0 auto; padding: 16px 14px 24px; }
.view-title { font-size: 1.45rem; margin: 6px 0 14px; }
.list-title { font-size: 1.05rem; margin: 22px 0 10px; color: var(--blue); }
.intro { color: var(--muted); font-size: 0.92rem; margin: -4px 0 16px; }
.muted { color: var(--muted); }
.error { color: var(--red); }

/* ---- Live-Statistik ---- */
/* 3 Hilfe-Counter (necesitan / ofrecen / centros) – immer EINE Zeile */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 2px 0 16px; }
.stats:empty { display: none; }
.fuente-link { color: var(--blue); text-decoration: underline; font-weight: 600; }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 6px; text-align: center; box-shadow: var(--shadow);
  font: inherit; cursor: pointer; transition: filter 0.12s, transform 0.05s;
}
.stat:hover { filter: brightness(0.97); }
.stat:active { transform: scale(0.98); }
.stat-ico { font-size: 1.1rem; }
.stat-num { font-size: 1.35rem; font-weight: 800; color: var(--blue); line-height: 1.15; }
.stat-lbl { font-size: 0.66rem; color: var(--muted); }
@media (max-width: 430px) { .stats { grid-template-columns: repeat(4, 1fr); } }

/* ---- Home-Tiles ---- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 4px;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease;
}
.tile:active { transform: scale(0.98); }
.tile-icon { font-size: 1.8rem; }
.tile-title { font-weight: 700; font-size: 1.02rem; }
.tile-desc { font-size: 0.8rem; color: var(--muted); }

/* ---- Scroll-Hinweis (Buscar personas) ---- */
.scroll-hint {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin: 0 0 14px;
  background: #fff8e1; color: #7a5c00;
  border: 1px solid #f0e0a0; border-radius: var(--radius);
  padding: 11px 14px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.scroll-hint:active { transform: scale(0.99); }
.scroll-arrow { font-size: 1.15rem; animation: bounce-down 1.4s infinite; }
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---- Externe Suchplattformen (prominent) ---- */
.extlinks {
  margin-bottom: 16px;
  background: #eef4ff;
  border: 1px solid #cfe0f5;
  border-left: 5px solid var(--blue-2);
}
.extlinks-title { margin: 0 0 2px; font-weight: 800; font-size: 1rem; color: var(--blue); }
.extlinks-sub { margin: 0 0 10px; font-size: 0.82rem; color: var(--muted); }
.extlinks-list { display: flex; flex-direction: column; gap: 8px; }
.extlink {
  display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.extlink:hover { border-color: var(--blue-2); }
.extlink:active { transform: scale(0.99); }
.extlink-name { font-weight: 700; color: var(--blue-2); }
.extlink-desc { font-size: 0.82rem; color: var(--muted); }

/* ---- Honeypot (Spam-Schutz, für Menschen unsichtbar) ---- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Teilen / QR ---- */
.share-row { display: flex; gap: 10px; margin-top: 16px; }
.share-row .btn { flex: 1; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 32, 48, 0.55);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  position: relative;
  background: #fff; border-radius: var(--radius);
  padding: 22px; max-width: 360px; width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border-radius: 999px;
  border: none; background: var(--bg); color: var(--muted);
  font-size: 1rem; cursor: pointer;
}
.qr-title { font-size: 1.1rem; margin: 0 0 14px; }
.qr-img { width: 240px; height: 240px; max-width: 100%; image-rendering: pixelated; }
.qr-url { font-size: 0.78rem; word-break: break-all; margin: 10px 0 14px; }

/* ---- Match-Banner (nach dem Veröffentlichen) ---- */
.match-banner {
  background: #e7f6ec;
  color: var(--green);
  border: 1px solid #bfe6cd;
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 4px 0 12px;
}
.match-found-banner .item-line { font-weight: 600; }
.match-found-banner .item-line.muted { font-weight: 400; }
/* Coincidencia-Hinweis innerhalb einer Karte (buscado -> encontrado) */
.match-en-card {
  background: #e7f6ec;
  border: 1px solid #bfe6cd;
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 0.9rem;
  color: #1c5b34;
}
.match-en-card strong { color: var(--green); display: block; margin-bottom: 2px; }
.match-salvo-card { background: #def7e6; border-left-color: #137a3a; }
.match-fallecido-card { background: #eceef1; border-left-color: #475569; }
.match-fallecido-card strong { color: #475569; }
.match-en-card .muted { font-size: 0.84rem; }

/* ---- Suche / Tools / Zähler ---- */
.searchbar { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.searchbar .search-input { margin-bottom: 0; flex: 1; min-width: 0; }
.near-btn { flex: 0 0 auto; white-space: nowrap; }
.near-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.search-input { margin-bottom: 10px; }
.list-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.list-tools .toolbar { margin-bottom: 0; }
.count-line { margin: 0; font-size: 0.82rem; }
.home-intro { margin-top: -4px; }
.view-title:focus { outline: none; }

/* ---- Standort-Button im Formular ---- */
.geo-row { margin-top: 6px; }

/* ---- Export-Leiste ---- */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar-lbl { font-size: 0.82rem; color: var(--muted); }

/* ---- Karte ---- */
.map {
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.map .leaflet-control-attribution { font-size: 0.62rem; }
.map-big { height: 360px; }
.map-pick { height: 240px; margin-top: 8px; }

/* ---- Centros: Tools (Umkreis + Listen/Karten-Umschalter) ---- */
.centros-tools { display: flex; gap: 8px; align-items: center; }
.radius-sel { width: auto; padding: 7px 10px; font-size: 0.85rem; }

/* ---- Cards / Listen ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.list { display: flex; flex-direction: column; gap: 10px; }
.item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-line { margin-top: 6px; font-size: 0.92rem; }
.item-foto { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin-top: 8px; display: block; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.item-actions:empty { display: none; }
.resolve-btn { color: var(--green); }
.ago { margin-left: auto; font-size: 0.78rem; }
.contact-val { font-weight: 700; color: var(--blue); }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-busca { background: #fdecea; color: var(--red); }
.badge-found { background: #eef0ff; color: #4338ca; }
.badge-salvo { background: #e7f6ec; color: var(--green); }
.badge-fallecido { background: #eceef1; color: #475569; }
/* Counter buscados / encontrados / a salvo */
.counters { display: flex; gap: 8px; margin: 8px 0 14px; }
.counter-pill {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 10px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; text-align: center;
  font: inherit; cursor: pointer; transition: filter 0.12s, transform 0.05s, box-shadow 0.12s;
}
.counter-pill:hover { filter: brightness(0.98); box-shadow: var(--shadow); }
.counter-pill:active { transform: scale(0.98); }
.counter-num { font-size: 1.35rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter-lbl { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.counter-buscado .counter-num { color: var(--red); }
.counter-encontrado .counter-num { color: #4338ca; }
.counter-asalvo .counter-num { color: var(--green); }
.counter-hospital .counter-num { color: #b9770e; }
.badge-hosp { background: #fff3e0; color: #b9770e; }
.hosp-line { font-weight: 700; color: #b9770e; }
.counter-fallecido .counter-num { color: #475569; }
/* Mobile: 5 Pills müssen in eine Zeile passen -> Zahl + Padding verkleinern,
   damit der Fallecidos-Counter nicht aus dem Bildschirm rutscht. */
@media (max-width: 480px) {
  .counters { gap: 5px; }
  .counter-pill { padding: 8px 3px; border-radius: 10px; }
  .counter-num { font-size: 1.02rem; }
  .counter-lbl { font-size: 0.6rem; }
}
@media (max-width: 360px) {
  .counters { gap: 4px; }
  .counter-pill { padding: 7px 2px; }
  .counter-num { font-size: 0.88rem; }
  .counter-lbl { font-size: 0.54rem; }
}

/* ---- Fallecidos-Info-Panel (nur im Fallecidos-Filter der Personen-Liste) ---- */
.fallecido-panel {
  background: #f8fafc; border: 1px solid var(--line); border-left: 4px solid #475569;
  border-radius: 10px; padding: 12px 14px; margin: 0 0 12px;
  font-size: 0.86rem; line-height: 1.5; color: #1f2937;
}
.fallecido-panel-nota { margin: 0 0 8px; }
.fallecido-panel-sr { margin: 0 0 8px; font-weight: 600; color: #334155; }
.fallecido-panel-src { margin: 0; font-size: 0.78rem; }
.fallecido-panel-src a { color: inherit; text-decoration: underline; }

/* ---- Notfall-Infos auf der Startseite ---- */
.emerg { margin: 22px 0 6px; }
.emerg-title { font-size: 1.1rem; margin: 0 0 2px; }
.emerg-intro { font-size: 0.84rem; color: var(--muted); margin: 0 0 12px; }
.emerg-group {
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; margin-bottom: 8px; overflow: hidden;
}
.emerg-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 700;
  list-style: none; user-select: none;
}
.emerg-summary::-webkit-details-marker { display: none; }
.emerg-summary::after { content: "▾"; color: var(--muted); transition: transform 0.15s; }
.emerg-group[open] .emerg-summary::after { transform: rotate(180deg); }
.emerg-count {
  margin-left: auto; margin-right: 4px; font-size: 0.72rem; font-weight: 700;
  color: var(--muted); background: #f1f5f9; border-radius: 999px; padding: 1px 8px;
}
.emerg-body { padding: 2px 14px 12px; border-top: 1px solid var(--line); }
.emerg-item {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px 10px; padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.emerg-item:last-child { border-bottom: none; }
.emerg-info { display: flex; flex-direction: column; }
.emerg-name { font-weight: 600; font-size: 0.9rem; }
.emerg-zona { font-size: 0.76rem; color: var(--muted); }
.emerg-tels { display: flex; flex-wrap: wrap; gap: 6px; }
.emerg-tel {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fdecea; color: var(--red); font-weight: 700; font-size: 0.82rem;
  padding: 5px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.emerg-tel:hover { filter: brightness(0.96); }
.rep-mag { font-weight: 800; font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rep-mag.rep-lo { background: #eef0ff; color: #4338ca; }
.rep-mag.rep-mid { background: #fff3e0; color: #b9770e; }
.rep-mag.rep-hi { background: #fdecea; color: var(--red); }
.emerg-guia { margin: 4px 0 12px; padding-left: 22px; }
.emerg-guia li { margin-bottom: 7px; font-size: 0.88rem; line-height: 1.4; }
.emerg-share { width: 100%; }
.emerg-oficial {
  font-size: 0.8rem; color: var(--muted); margin: 6px 2px 0; text-align: center;
}
.fuente-link { color: var(--blue); font-weight: 600; text-decoration: underline; }
.aparecio-btn { background: var(--green); color: #fff; border: 1px solid var(--green); font-weight: 800; flex: 1 0 100%; text-align: center; padding: 10px; }
.aparecio-btn:hover { filter: brightness(0.95); }
.badge-cat { background: #eaf1f8; color: var(--blue-2); }
/* Mascotas */
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }
.badge-mascota { background: #eef0ff; color: #4338ca; }
/* Edificios afectados */
.badge-edif { background: #eceef1; color: #475569; }
.badge-edif-collapsed { background: #fdecea; color: var(--red); }
.badge-edif-damaged { background: #fff3e0; color: #b9770e; }
.badge-edif-trapped { background: #fdecea; color: var(--red); }
.badge-sev { font-weight: 700; }
.badge-sev.sev-rojo { background: #fdecea; color: var(--red); }
.badge-sev.sev-naranja { background: #fff3e0; color: #b9770e; }
.badge-sev.sev-amarillo { background: #fef9c3; color: #854d0e; }
/* Rescate – höchste Dringlichkeit */
.item-rescate { border: 2px solid var(--red); background: #fff5f5; }
.badge-rescate { background: var(--red); color: #fff; font-weight: 800; }
.badge-mascota-perdida { background: #fdecea; color: var(--red); }
.badge-mascota-encontrada { background: #e7f6ec; color: var(--green); }
.badge-mascota-refugio { background: #fff3e0; color: #b9770e; }
.badge-mascota-veterinario { background: #eaf1f8; color: var(--blue-2); }
.badge-ok { background: #e7f6ec; color: var(--green); }
.badge-warn { background: #fff3e0; color: #b9770e; }

/* ---- Formular ---- */
.form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld-label { font-size: 0.85rem; font-weight: 600; }
.fld-help { font-size: 0.74rem; color: var(--muted); }
input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(30, 96, 145, 0.15);
}
textarea { resize: vertical; }
.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12); }
.form-actions { margin-top: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); }
.asis-home { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: .2rem 0 1rem; padding: 14px 16px; border: 1px solid var(--blue); border-radius: 14px; background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(37,99,235,.02)); cursor: pointer; }
.asis-home:hover { background: linear-gradient(135deg, rgba(37,99,235,.16), rgba(37,99,235,.05)); }
.asis-home-ico { font-size: 1.7rem; line-height: 1; flex: 0 0 auto; }
.asis-home-tx { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.asis-home-t { font-weight: 700; font-size: 1.02rem; color: var(--blue); }
.asis-home-d { font-size: .85rem; color: var(--muted); }
.asis-home-arrow { font-size: 1.6rem; color: var(--blue); flex: 0 0 auto; }
.report-toggle-wrap { margin: .4rem 0 .8rem; }
.report-toggle-wrap .form-toggle { display: block; width: 100%; min-height: 48px; font-weight: 700; font-size: 1.02rem; }
.collapse-box[hidden] { display: none; }
.collapse-box { margin-top: .6rem; }
.btn-ghost { background: #fff; color: var(--blue); border-color: var(--line); }

/* ---- Segmented / Chips ---- */
.segmented { display: flex; gap: 8px; margin-bottom: 14px; }
.seg {
  flex: 1; padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-weight: 600; cursor: pointer;
}
.seg.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.seg[disabled] { opacity: 0.45; cursor: default; }
.filtro-lista { margin-top: -4px; margin-bottom: 12px; }
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 16px 0 4px; flex-wrap: wrap;
}
.pager:empty { display: none; }
.pager-btn { flex: 0 0 auto; min-width: 110px; }
.pager-btn[disabled] { opacity: 0.4; cursor: default; }
.pager-info { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 0.85rem; cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--blue-2); color: #fff; border-color: var(--blue-2); }

/* ---- Bottom-Nav ---- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.navbtn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 0.68rem; font-weight: 600;
}
.navbtn-ico { font-size: 1.25rem; }
.navbtn.active { color: var(--blue); }

/* ---- Rechtsseiten ---- */
.legal { line-height: 1.6; }
.legal h1 { font-size: 1.5rem; margin: 8px 0 4px; }
.legal h2 { font-size: 1.1rem; color: var(--blue); margin: 24px 0 6px; }
.legal p, .legal li { font-size: 0.95rem; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--blue-2); }

/* ---- Footer ---- */
.footer { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 10px 0 4px; }
.footer a { color: var(--muted); text-decoration: underline; }
.footer-links { margin-top: 4px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 96px;
  transform: translate(-50%, 10px);
  background: var(--text); color: #fff;
  padding: 11px 18px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  opacity: 0; transition: opacity 0.25s, transform 0.25s;
  z-index: 50; max-width: 90%;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }

@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Deep-Link-Hervorhebung eines Eintrags ---- */
.deeplink-flash { animation: deeplink-flash 2.4s ease-out 1; }
@keyframes deeplink-flash {
  0% { box-shadow: 0 0 0 3px var(--blue), 0 0 0 8px rgba(37,99,235,0.25); }
  60% { box-shadow: 0 0 0 3px var(--blue), 0 0 0 8px rgba(37,99,235,0.15); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* ---- Avisos para voluntarios (ntfy-Abo) ---- */
.avisos-box { background: #eef6ff; border: 1px solid #cfe3f7; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.avisos-title { font-weight: 800; font-size: 0.98rem; }
.avisos-sub { font-size: 0.84rem; margin: 2px 0 10px; }
.avisos-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.avisos-cat {
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; font-size: 0.85rem; font-weight: 700; color: var(--blue-2);
}
.avisos-cat:hover { filter: brightness(0.97); }
.avisos-cat-urg { background: var(--red); color: #fff; border-color: var(--red); }
.avisos-cat-all { background: var(--blue); color: #fff; border-color: var(--blue); }
.avisos-hint { font-size: 0.76rem; margin: 10px 0 0; }
.wa-ayuda { background: #25d366; color: #fff; font-weight: 700; text-decoration: none; }
.wa-ayuda:hover { filter: brightness(0.96); }

/* ---- KI-Assistent: schwebender Button + Modal ---- */
.asistente-fab {
  position: fixed; right: 14px; bottom: 80px; z-index: 1200;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px 12px 16px; border: none; border-radius: 999px; cursor: pointer;
  color: #fff; font: inherit; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.2px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 8px 24px rgba(79,70,229,0.45);
  transition: transform 0.08s, box-shadow 0.15s, filter 0.12s;
  animation: fab-pulse 2.6s ease-in-out infinite;
}
.asistente-fab .fab-ico { font-size: 1.25rem; line-height: 1; }
.asistente-fab .fab-lbl { white-space: nowrap; }
.asistente-fab:hover { filter: brightness(1.05); box-shadow: 0 10px 28px rgba(79,70,229,0.55); }
.asistente-fab:active { transform: scale(0.96); animation: none; }
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(79,70,229,0.45); }
  50% { box-shadow: 0 8px 30px rgba(124,58,237,0.7); }
}
@media (max-width: 380px) { .asistente-fab .fab-lbl { display: none; } .asistente-fab { padding: 13px; } }
.asis-overlay {
  position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.asis-panel {
  background: var(--bg, #fff); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 16px 16px 0 0; padding: 16px 16px 28px; box-shadow: 0 -6px 30px rgba(0,0,0,0.3);
}
@media (min-width: 600px) { .asis-overlay { align-items: center; } .asis-panel { border-radius: 16px; } }
.asis-head { display: flex; align-items: center; justify-content: space-between; }
.asis-head strong { font-size: 1.1rem; }
.asis-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.asis-sub { font-size: 0.84rem; margin: 2px 0 10px; }
.asis-text { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; margin-bottom: 8px; }
.asis-filewrap {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem;
  border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px;
}
.asis-file { display: none; }
.asis-thumb img { max-width: 120px; max-height: 120px; border-radius: 8px; display: block; margin-bottom: 8px; }
.asis-turnstile { margin: 4px 0; }
.asis-status { font-size: 0.88rem; color: var(--muted); margin: 8px 0; }
.asis-result { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.asis-fields { display: flex; flex-direction: column; gap: 8px; }
.asis-cat, .asis-fields input { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.asis-aviso { background: #fff3e0; color: #b9770e; border-radius: 10px; padding: 8px 10px; font-size: 0.86rem; }
/* Gesichtssuche-Treffer */
.asis-face-hit {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; cursor: pointer; font: inherit;
}
.asis-face-hit:hover { filter: brightness(0.98); box-shadow: var(--shadow); }
.asis-face-hit img, .asis-face-noimg {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; background: #eef0f3; font-size: 1.4rem;
}
.asis-face-info { min-width: 0; }
.asis-face-name { font-weight: 700; }
.asis-face-conf { font-size: 0.8rem; color: var(--blue-2); font-weight: 700; }
.asis-conf { font-size: 0.78rem; }

/* Respektiert System-Einstellung "Bewegung reduzieren" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   RDC (Rendición de cuentas) – Layout-Politur (übersteuert die
   Inline-Styles von admin.html / der geheimen RDC-Seite).
   ============================================================ */
#rdc .notis-head { flex-wrap: wrap !important; row-gap: 8px !important; }
#rdc .notis-head > div { display: flex; flex-wrap: wrap; gap: 6px; }
#rdc-tools { gap: 8px !important; align-items: center; }
#rdc-tools input, #rdc-tools select { flex: 1 1 160px; max-width: 100%; }
.rdc-counters { gap: 8px !important; margin: 6px 0 14px !important; }
.rdc-counter { flex: 1 1 92px; }

/* Gruppen-Kopf klar als aufklappbar erkennbar */
.rdc-person { margin-bottom: 12px !important; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.rdc-person > summary { background: #f8fafc !important; border-bottom: 1px solid var(--line); }
.rdc-person[open] > summary { position: sticky; top: 44px; z-index: 3; }
.rdc-person > summary:hover { background: #eef2f7 !important; }

/* Einzel-Eintrag als lesbare Karte */
.rdc-entry { border: 1px solid var(--line) !important; border-radius: 10px !important;
  margin: 10px !important; padding: 12px 14px !important; background: #fff !important; }
.rdc-entry > div { min-width: 0; }
.rdc-entry .mc-desc { font-size: 0.9rem !important; line-height: 1.5 !important; color: #1f2937; word-break: break-word; }
.dif-badge { white-space: nowrap; }

/* Verbindungskarte (jetzt unten + zugeklappt) optisch abgesetzt */
.rdc-red { margin-top: 16px !important; }

@media (max-width: 560px) {
  .rdc-counter { flex: 1 1 44%; }
  .rdc-person[open] > summary { position: static; }
  .rdc-entry { margin: 8px 4px !important; }
}
