/* =========================================================================
   Vergissmeinnicht – Komponenten (baut auf design-tokens.css auf)
   ========================================================================= */

/* ---------- Basis & Typografie ---------- */
body{
  background-color:var(--vm-bg);
  color:var(--vm-ink);
  font-family:var(--vm-sans);
  min-height:100vh;
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:hidden;   /* verhindert horizontalen Scroll durch das fixe Offcanvas-Panel */
}
h1,h2,h3,h4{ text-wrap:balance; color:var(--vm-ink); }
h1,.h1{ font-weight:700; letter-spacing:-.015em; }
h2,.h2,h3,.h3{ font-weight:700; letter-spacing:-.01em; }
.text-muted{ color:var(--vm-ink-muted) !important; }
a{ text-underline-offset:2px; }
:focus-visible{ outline:3px solid color-mix(in srgb,var(--vm-primary) 45%,white); outline-offset:2px; }
::selection{ background:var(--vm-primary-050); }
.tnum,.vm-num{ font-variant-numeric:tabular-nums; }
main.container,.container,.container-fluid{ max-width:var(--vm-wrap); }

/* ---------- Karten ---------- */
.card{
  background:var(--vm-surface);
  border:1px solid var(--vm-border);
  border-radius:var(--vm-r-lg);
  box-shadow:var(--vm-sh-sm);
}
.card .card-body{ padding:1.15rem 1.25rem; }

/* ---------- Formulare ---------- */
.form-control,.form-select{
  min-height:var(--vm-control-h);
  font-size:16px;                 /* verhindert iOS-Zoom */
  border-color:var(--vm-border-strong);
  border-radius:var(--vm-r);
  color:var(--vm-ink);
}
textarea.form-control{ min-height:auto; }
.form-control::placeholder{ color:var(--vm-ink-subtle); }
.form-label{ font-weight:600; font-size:.9rem; margin-bottom:.35rem; }
.form-text{ color:var(--vm-ink-muted); }
.form-control:focus,.form-select:focus{
  border-color:var(--vm-primary);
  box-shadow:0 0 0 .2rem color-mix(in srgb,var(--vm-primary) 22%,transparent);
}
.was-validated .form-control:invalid,.form-control.is-invalid{ border-color:var(--vm-danger); }
.vm-required{ color:var(--vm-danger); font-weight:700; }
.vm-formnote{
  font-size:.85rem; color:var(--vm-ink-muted);
  background:var(--vm-surface-2); border:1px solid var(--vm-border);
  border-radius:var(--vm-r); padding:.55rem .8rem; margin-bottom:1rem;
}

/* ---------- Buttons ---------- */
.btn{ border-radius:var(--vm-r); font-weight:600; }
.btn-lg{ min-height:var(--vm-control-h); }
.btn-vm{
  background-color:var(--vm-primary); border-color:var(--vm-primary); color:#fff;
}
.btn-vm:hover,.btn-vm:focus{ background-color:var(--vm-primary-strong); border-color:var(--vm-primary-strong); color:#fff; }
.btn-outline-secondary{
  color:var(--vm-primary-strong); border-color:var(--vm-border-strong); background:var(--vm-surface);
}
.btn-outline-secondary:hover{ background:var(--vm-primary-050); border-color:var(--vm-primary); color:var(--vm-primary-strong); }
.btn-outline-primary{ color:var(--vm-primary-strong); border-color:var(--vm-primary); }
.btn-outline-primary:hover{ background:var(--vm-primary); border-color:var(--vm-primary); color:#fff; }
.btn-success{ --bs-btn-bg:var(--vm-success); --bs-btn-border-color:var(--vm-success); --bs-btn-hover-bg:#276b2a; --bs-btn-hover-border-color:#276b2a; }
.btn-danger{ --bs-btn-bg:var(--vm-danger); --bs-btn-border-color:var(--vm-danger); --bs-btn-hover-bg:#a52626; --bs-btn-hover-border-color:#a52626; }
.text-vm{ color:var(--vm-primary-strong) !important; }
.bg-vm-soft{ background-color:var(--vm-primary-050); }

/* ---------- Kopfleiste / Navigation ---------- */
.navbar-vm{
  background-color:var(--vm-primary);
  box-shadow:var(--vm-sh-sm);
  padding-block:.4rem;
}
.navbar-logo-box{
  display:inline-flex; align-items:center; background:#fff;
  border-radius:8px; padding:5px 11px;
}
.navbar-logo{ height:28px; width:auto; display:block; }
.navbar-module{
  color:#fff; font-weight:600; opacity:.95; font-size:.95rem;
  padding-inline-start:.85rem; margin-inline-start:.6rem;
  border-inline-start:1px solid rgba(255,255,255,.28);
}
.navbar-vm .navbar-brand,.navbar-vm .nav-link{ color:#fff !important; }
.navbar-vm .nav-link{ border-radius:var(--vm-r); padding-inline:.7rem; font-weight:500; opacity:.9; }
.navbar-vm .nav-link:hover{ opacity:1; background:rgba(255,255,255,.12); text-decoration:none; }
.navbar-vm .nav-link.active{ opacity:1; background:rgba(255,255,255,.18); }
.navbar-vm .dropdown-toggle{ display:inline-flex; align-items:center; gap:.4rem; }
.navbar-vm .navbar-toggler{ border-color:rgba(255,255,255,.4); }
.navbar-icon{ width:18px; height:18px; vertical-align:-3px; }
/* Apps-Schaltfläche direkt neben dem Logo (nur Icon) */
.navbar-apps-link{ display:inline-flex; align-items:center; gap:.4rem; padding-inline:.6rem; }
.navbar-apps-text{ font-weight:600; }
.navbar-apps-ico{ width:23px; height:23px; vertical-align:middle; }
/* Flaggen im Sprachmenü */
.vm-flag{
  display:inline-block; vertical-align:middle; border-radius:2.5px; overflow:hidden;
  box-shadow:0 0 0 1px rgba(0,0,0,.12); flex:0 0 auto;
}
.navbar-vm .dropdown-toggle .vm-flag{ box-shadow:0 0 0 1px rgba(255,255,255,.35); }
.dropdown-menu{ border-color:var(--vm-border); border-radius:var(--vm-r); box-shadow:var(--vm-sh); }
.dropdown-item.active,.dropdown-item:active{ background:var(--vm-primary); }

/* ---------- Seitenkopf ---------- */
.vm-page-header{
  display:flex; align-items:flex-start; gap:1rem; flex-wrap:wrap; margin-bottom:1.25rem;
}
.vm-page-header .vm-ph-crumb{ font-size:.78rem; color:var(--vm-ink-subtle); margin-bottom:.15rem; }
.vm-page-header h1{ font-size:1.55rem; margin:0; }
.vm-page-header .vm-ph-desc{ margin:.25rem 0 0; color:var(--vm-ink-muted); font-size:.92rem; }
.vm-page-header .vm-ph-actions{ margin-inline-start:auto; display:flex; gap:.6rem; flex-wrap:wrap; }

/* ---------- Kennzahlenkarten ---------- */
.vm-stat{ display:flex; flex-direction:column; gap:.35rem; padding:1.1rem 1.15rem; }
.vm-stat .vm-stat-ico{
  width:34px; height:34px; border-radius:9px; display:grid; place-items:center;
  background:var(--vm-primary-050); color:var(--vm-primary-strong); margin-bottom:.15rem;
}
.vm-stat .vm-stat-ico svg{ width:19px; height:19px; }
.vm-stat .vm-stat-num{ font-size:2rem; font-weight:700; line-height:1; color:var(--vm-ink); font-variant-numeric:tabular-nums; }
.vm-stat .vm-stat-lbl{ font-size:.86rem; color:var(--vm-ink-muted); }
a.vm-stat{ text-decoration:none; color:inherit; transition:transform .12s, box-shadow .12s, border-color .12s; }
a.vm-stat:hover{ transform:translateY(-2px); box-shadow:var(--vm-sh); border-color:var(--vm-border-strong); }
.vm-stat.is-alert .vm-stat-ico{ background:var(--vm-danger-bg); color:var(--vm-danger-ink); }
/* Alt-Klassen weiter unterstützt */
.stat-card{ border-inline-start:4px solid var(--vm-primary); }
.stat-number{ font-size:2rem; font-weight:700; color:var(--vm-primary-strong); font-variant-numeric:tabular-nums; }

/* ---------- Statusanzeigen ---------- */
.vm-badge{
  display:inline-flex; align-items:center; gap:.4rem; height:26px; padding:0 .65rem;
  border-radius:var(--vm-pill); font-size:.78rem; font-weight:600;
  border:1px solid transparent; white-space:nowrap;
}
.vm-badge svg{ width:13px; height:13px; }
.vm-badge .vm-dot{ width:8px; height:8px; border-radius:50%; background:currentColor; }
.vm-badge.is-neutral{ color:var(--vm-neutral-ink); background:var(--vm-neutral-bg); border-color:#dde2d8; }
.vm-badge.is-info{ color:var(--vm-info-ink); background:var(--vm-info-bg); border-color:#cfe2df; }
.vm-badge.is-progress{ color:var(--vm-warning-ink); background:var(--vm-warning-bg); border-color:#ecdcb4; }
.vm-badge.is-danger{ color:var(--vm-danger-ink); background:var(--vm-danger-bg); border-color:#eecccc; }
.vm-badge.is-success{ color:var(--vm-success-ink); background:var(--vm-success-bg); border-color:#cfe6d1; }

/* ---------- App-Übersicht (Kacheln) ---------- */
.vm-app{
  display:flex; flex-direction:column; gap:.75rem; padding:1.4rem;
  text-decoration:none; color:inherit; height:100%;
  transition:transform .12s, box-shadow .12s, border-color .12s;
}
.vm-app:hover{ transform:translateY(-3px); box-shadow:var(--vm-sh); border-color:var(--vm-border-strong); }
.vm-app .vm-app-top{ display:flex; align-items:center; gap:.75rem; }
.vm-app .vm-app-mark{
  width:46px; height:46px; border-radius:12px; display:grid; place-items:center;
  background:var(--vm-primary); color:#fff; flex:0 0 auto;
}
.vm-app .vm-app-mark svg{ width:24px; height:24px; }
.vm-app h2{ font-size:1.05rem; margin:0; }
.vm-app p{ margin:0; color:var(--vm-ink-muted); font-size:.9rem; flex:1; }
.vm-app .vm-app-go{ display:inline-flex; align-items:center; gap:.35rem; color:var(--vm-primary-strong); font-weight:600; font-size:.9rem; }
.vm-app .vm-app-go svg{ width:16px; height:16px; }
/* Alt-Klasse */
.app-tile{ transition:transform .12s, box-shadow .12s; }
.app-tile:hover{ transform:translateY(-3px); box-shadow:var(--vm-sh) !important; }

/* ---------- Leeransicht ---------- */
.vm-empty{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:.6rem; padding:2.75rem 1.5rem; }
.vm-empty .vm-empty-ico{ width:56px; height:56px; border-radius:16px; display:grid; place-items:center; background:var(--vm-surface-2); color:var(--vm-ink-subtle); }
.vm-empty .vm-empty-ico svg{ width:28px; height:28px; }
.vm-empty h3{ font-size:1.05rem; margin:0; }
.vm-empty p{ margin:0; color:var(--vm-ink-muted); max-width:42ch; font-size:.92rem; }

/* ---------- Upload-Dropzone ---------- */
.vm-dropzone{
  border:2px dashed var(--vm-border-strong); border-radius:var(--vm-r-lg);
  background:var(--vm-surface-2); padding:1.9rem 1.25rem; text-align:center;
}
.vm-dropzone .vm-dz-ico{
  width:56px; height:56px; border-radius:16px; display:inline-grid; place-items:center;
  background:var(--vm-primary-050); color:var(--vm-primary-strong); margin-bottom:.55rem;
}
.vm-dropzone .vm-dz-ico svg{ width:28px; height:28px; }
.vm-dropzone h2{ font-size:1.05rem; margin:0 0 .2rem; }
.vm-dropzone .vm-dz-hint{ color:var(--vm-ink-muted); font-size:.85rem; margin-bottom:1rem; }
.vm-dropzone .btn svg{ vertical-align:-3px; margin-inline-end:.35rem; }

/* ---------- Filter-Chips ---------- */
.vm-chips{ display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1rem; }
.vm-chip{
  display:inline-flex; align-items:center; gap:.4rem; padding:.25rem .3rem .25rem .65rem;
  border-radius:var(--vm-pill); background:var(--vm-primary-050); color:var(--vm-primary-strong);
  border:1px solid #d4e3d0; font-size:.82rem; font-weight:500;
}
.vm-chip button{
  border:0; background:transparent; color:inherit; cursor:pointer; line-height:1; padding:.1rem .25rem;
  display:inline-flex; opacity:.65; border-radius:var(--vm-pill);
}
.vm-chip button:hover{ opacity:1; background:rgba(0,0,0,.06); }

/* ---------- klickbare Tabellenzeile & mobile Belegkarte ---------- */
tr.vm-row-link{ cursor:pointer; }
tr.vm-row-link:hover{ background:var(--vm-surface-2); }
.vm-rcard{ display:grid; gap:.5rem; padding:.9rem 1rem; text-decoration:none; color:inherit; }
.vm-rcard + .vm-rcard{ border-top:1px solid var(--vm-border); }
.vm-rcard:hover{ background:var(--vm-surface-2); }
.vm-rcard .vm-rc-top{ display:flex; justify-content:space-between; gap:.75rem; align-items:baseline; }
.vm-rcard .vm-rc-m{ font-weight:600; }
.vm-rcard .vm-rc-amt{ font-family:var(--vm-mono); font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
.vm-rcard .vm-rc-meta{ display:flex; justify-content:space-between; align-items:center; gap:.5rem; color:var(--vm-ink-muted); font-size:.85rem; }
.vm-rcard .vm-rc-sub{ color:var(--vm-ink-subtle); font-size:.8rem; }

/* ---------- Tabellen ---------- */
.table{ --bs-table-border-color:var(--vm-border); }
.table > thead th{
  font-size:.72rem; letter-spacing:.05em; text-transform:uppercase;
  color:var(--vm-ink-subtle); font-weight:600; border-bottom:1px solid var(--vm-border);
}
.table td{ vertical-align:middle; }

/* ---------- Modul-Layout mit Seitenleiste ---------- */
.vm-layout{ display:flex; gap:1.5rem; align-items:flex-start; }
.vm-layout--full{ display:block; }
.vm-sidebar{ flex:0 0 212px; position:sticky; top:76px; }
.vm-main{ flex:1 1 auto; min-width:0; }
.vm-nav{ display:flex; flex-direction:column; gap:2px; }
.vm-nav a{
  display:flex; align-items:center; gap:.6rem; padding:.5rem .7rem;
  border-radius:var(--vm-r); color:var(--vm-ink-muted); text-decoration:none;
  font-weight:500; font-size:.92rem;
}
.vm-nav a svg{ width:18px; height:18px; flex:0 0 auto; }
.vm-nav a:hover{ background:var(--vm-surface-2); color:var(--vm-ink); }
.vm-nav a.active{ background:var(--vm-primary-050); color:var(--vm-primary-strong); font-weight:600; }
.vm-nav .vm-nav-sep{ height:1px; background:var(--vm-border); margin:.4rem .2rem; }
@media (max-width:991.98px){
  /* Spalten-Layout: Inhalt auf Containerbreite strecken, sonst richtet sich
     .vm-main nach seiner Inhaltsbreite (align-items erbt sonst flex-start) und
     verursacht auf dem Smartphone horizontalen Überlauf. */
  .vm-layout{ flex-direction:column; gap:1rem; align-items:stretch; }
  .vm-sidebar{ position:static; flex:none; width:100%; }
  .vm-nav{ flex-direction:row; overflow-x:auto; gap:.4rem; padding-bottom:.25rem; -webkit-overflow-scrolling:touch; }
  .vm-nav a{ white-space:nowrap; border:1px solid var(--vm-border); }
  .vm-nav a.active{ border-color:var(--vm-primary); }
  .vm-nav .vm-nav-sep{ display:none; }
}

/* ---------- Meldungen ---------- */
.alert{ border-radius:var(--vm-r); border-width:1px; }
.alert-success{ --bs-alert-bg:var(--vm-success-bg); --bs-alert-border-color:#cfe6d1; --bs-alert-color:var(--vm-success-ink); }
.alert-info{ --bs-alert-bg:var(--vm-info-bg); --bs-alert-border-color:#cfe2df; --bs-alert-color:var(--vm-info-ink); }
.alert-warning{ --bs-alert-bg:var(--vm-warning-bg); --bs-alert-border-color:#ecdcb4; --bs-alert-color:var(--vm-warning-ink); }
.alert-danger{ --bs-alert-bg:var(--vm-danger-bg); --bs-alert-border-color:#eecccc; --bs-alert-color:var(--vm-danger-ink); }

/* ---------- Spendenbescheinigung ---------- */
.kind-card{
  cursor:pointer; border:2px solid var(--vm-border); border-radius:var(--vm-r);
  transition:border-color .15s, box-shadow .15s, background-color .15s;
}
.kind-card:hover{ border-color:var(--vm-accent); }
.kind-card.selected{
  border-color:var(--vm-primary); background-color:var(--vm-primary-050);
  box-shadow:0 0 0 .2rem color-mix(in srgb,var(--vm-primary) 15%,transparent);
}
.kind-card input{ pointer-events:none; }
.kind-card .kind-ico{ width:40px; height:40px; border-radius:10px; display:grid; place-items:center;
  background:var(--vm-primary-050); color:var(--vm-primary-strong); flex:0 0 auto; }
.kind-card .kind-ico svg{ width:22px; height:22px; }
.kind-card.selected .kind-ico{ background:var(--vm-primary); color:#fff; }
.donation-row{ background:var(--vm-surface); border:1px solid var(--vm-border); border-radius:var(--vm-r); padding:1rem; margin-bottom:.75rem; }

/* Zusammenfassung der Spendenbescheinigung */
.vm-summary{ background:var(--vm-primary-050); border:1px solid #d4e3d0; border-radius:var(--vm-r-lg); padding:1.15rem 1.25rem; }
.vm-summary-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; text-align:center; }
.vm-summary-num{ font-size:1.6rem; font-weight:700; color:var(--vm-primary-strong); font-variant-numeric:tabular-nums; line-height:1.1; }
.vm-summary-lbl{ font-size:.82rem; color:var(--vm-ink-muted); }

/* ---------- Login ---------- */
.login-wrapper{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:1.5rem; }
.login-card{ max-width:420px; width:100%; }
.login-logo{ max-width:230px; width:100%; height:auto; }

/* ---------- Status-Textfarben (Spenden, Alt) ---------- */
.status-draft{ color:var(--vm-ink-muted); }
.status-created{ color:var(--vm-info); }
.status-pdf_generated{ color:var(--vm-primary-strong); }
.status-cancelled{ color:var(--vm-danger); text-decoration:line-through; }

/* ---------- RTL: richtungsabhängige Feinheiten ---------- */
[dir="rtl"] .navbar-module{ border-inline-start:1px solid rgba(255,255,255,.28); }
[dir="rtl"] .vm-num,[dir="rtl"] .tnum{ direction:ltr; unicode-bidi:plaintext; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; animation:none !important; }
}

/* ---------- Druck ---------- */
@media print{
  .navbar,.no-print{ display:none !important; }
  body{ background:#fff; }
}

/* ---------- Spender-Dankesrufe (thankyou_calls) ---------- */
.tc-callbox{ text-align:center; padding:1.25rem 1rem; border:1px solid var(--vm-border);
  border-radius:var(--vm-r-lg); background:var(--vm-surface-2); margin-bottom:1.25rem; }
.tc-phone{ font-family:var(--vm-mono); font-variant-numeric:tabular-nums; font-size:2rem;
  font-weight:700; color:var(--vm-ink); letter-spacing:.02em; display:block;
  margin-bottom:.85rem; word-break:break-word; text-decoration:none; }
.tc-phone:hover{ text-decoration:underline; }
.tc-callbtn{ font-size:1.25rem; padding:.85rem 1.25rem; min-height:56px; }
.tc-actions{ display:grid; grid-template-columns:1fr 1fr; gap:.75rem; margin-top:1rem; }
.tc-bigbtn{ min-height:56px; font-size:1.1rem; display:flex; align-items:center;
  justify-content:center; gap:.5rem; }
@media (max-width:520px){ .tc-actions{ grid-template-columns:1fr; } }
.tc-donation{ display:flex; justify-content:space-between; gap:1rem; padding:.55rem 0;
  border-bottom:1px solid var(--vm-border); }
.tc-donation:last-child{ border-bottom:0; }
.tc-donation .tc-d-amt{ font-family:var(--vm-mono); font-variant-numeric:tabular-nums;
  font-weight:600; white-space:nowrap; }
.tc-note-meta{ color:var(--vm-ink-subtle); font-size:.85rem; margin-top:.4rem; }
.tc-sum{ font-family:var(--vm-mono); font-variant-numeric:tabular-nums; font-weight:700;
  font-size:1.35rem; color:var(--vm-ink); }

/* ---------- Datei-Manager (file_manager) ---------- */
.fm-ico{ width:22px; height:22px; }
.fm-ico-wrap{ display:inline-grid; place-items:center; width:34px; height:34px;
  border-radius:9px; background:var(--vm-surface-2); color:var(--vm-ink-muted);
  flex:0 0 auto; }
.fm-ico-wrap.fm-folder{ background:var(--vm-primary-050); color:var(--vm-primary-strong); }
.fm-name{ display:inline-flex; align-items:center; gap:.6rem; text-decoration:none;
  color:var(--vm-ink); font-weight:500; }
.fm-name:hover{ color:var(--vm-primary-strong); }
.fm-breadcrumb .breadcrumb{ background:transparent; padding:0; font-size:.95rem; }
.fm-breadcrumb .breadcrumb-item a{ color:var(--vm-primary-strong); text-decoration:none; }
.fm-breadcrumb .breadcrumb-item.active{ color:var(--vm-ink-muted); }
.fm-toolbar{ display:flex; align-items:center; }
.fm-table td, .fm-table th{ vertical-align:middle; }
.vm-dropzone{ cursor:pointer; display:block; }
.vm-dropzone.is-drag{ border-color:var(--vm-primary); background:var(--vm-primary-050); }
.vm-dropzone svg{ color:var(--vm-primary-strong); }

/* Mobile Karten (Dateien/Ordner) */
.fm-cards{ display:flex; flex-direction:column; }
.fm-card{ display:flex; align-items:center; gap:.5rem; padding:.7rem .9rem; }
.fm-card + .fm-card{ border-top:1px solid var(--vm-border); }
.fm-card-main{ display:flex; align-items:center; gap:.7rem; text-decoration:none;
  color:inherit; flex:1 1 auto; min-width:0; }
.fm-card-body{ display:flex; flex-direction:column; min-width:0; }
.fm-card-name{ font-weight:600; color:var(--vm-ink); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.fm-card-meta{ color:var(--vm-ink-muted); font-size:.82rem; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }

/* Speicheranzeige */
.fm-storage{ margin-top:1rem; padding:.85rem .9rem; border:1px solid var(--vm-border);
  border-radius:var(--vm-r); background:var(--vm-surface); }
.fm-storage-head{ display:flex; align-items:center; gap:.5rem; margin-bottom:.5rem; }
.fm-storage-ico{ width:26px; height:26px; display:inline-grid; place-items:center;
  border-radius:7px; background:var(--vm-primary-050); color:var(--vm-primary-strong); }
.fm-storage-ico svg{ width:16px; height:16px; }
.fm-storage-title{ font-weight:600; font-size:.9rem; }
.fm-storage-progress{ height:.5rem; margin-bottom:.4rem; }
.fm-storage-text{ font-size:.82rem; color:var(--vm-ink-muted); }
.fm-storage-warn{ font-size:.8rem; color:var(--vm-danger); margin-top:.25rem; }

/* Vorschau + Zielauswahl */
.fm-preview{ width:100%; height:70vh; border:1px solid var(--vm-border);
  border-radius:var(--vm-r); background:#fff; }
.fm-targets{ display:flex; flex-direction:column; gap:.25rem; max-height:50vh;
  overflow-y:auto; }
.fm-target{ display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem;
  border-radius:var(--vm-r); cursor:pointer; }
.fm-target:hover{ background:var(--vm-surface-2); }
.fm-target-path{ font-size:.92rem; }

/* Datei-Manager – UI-Überarbeitung */
.fm-hint{ display:flex; align-items:flex-start; gap:.6rem; padding:.7rem .9rem;
  border:1px solid var(--vm-border); border-radius:var(--vm-r);
  background:var(--vm-surface-2); color:var(--vm-ink-muted); font-size:.9rem;
  margin-bottom:1rem; }
.fm-hint-ico{ color:var(--vm-info-ink); flex:0 0 auto; margin-top:1px; }
.fm-hint-ico svg{ width:20px; height:20px; }
.fm-storage-sub{ font-size:.8rem; color:var(--vm-ink-subtle); margin-top:.15rem; }
.fm-search .input-group-text{ background:var(--vm-surface);
  border-color:var(--vm-border-strong); color:var(--vm-ink-muted); }
/* Eigener Benutzerordner – ruhige Hervorhebung */
.fm-card.fm-own{ background:var(--vm-primary-050);
  box-shadow:inset 3px 0 0 var(--vm-primary); }
tr.fm-own td{ background:var(--vm-primary-050); }
tr.fm-own td:first-child{ box-shadow:inset 3px 0 0 var(--vm-primary); }
.fm-own .fm-ico-wrap.fm-folder{ background:var(--vm-primary); color:#fff; }

/* ---------- Einreise erstellen (einreise) ---------- */
.ein-form{ max-width:720px; }
.ein-steps{ display:flex; flex-wrap:wrap; gap:.4rem; }
.ein-step{ font-size:.78rem; color:var(--vm-ink-muted); background:var(--vm-surface-2);
  border:1px solid var(--vm-border); border-radius:var(--vm-pill); padding:.2rem .6rem; }
.ein-step.is-current{ background:var(--vm-primary-050); color:var(--vm-primary-strong);
  border-color:var(--vm-primary); font-weight:600; }
.ein-step.is-done{ color:var(--vm-success-ink); border-color:#cfe6d1; }
/* Festes Vorschaufenster: das GANZE freigestellte Bild passt immer hinein. */
.ein-sig-preview{ display:block; width:100%; height:220px; object-fit:contain;
  background:repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px; }

/* ========== Mobiler Apps-FAB (schneller Zugriff auf die App-Übersicht) ========== */
.vm-fab{
  position:fixed;
  inset-block-end:calc(env(safe-area-inset-bottom, 0px) + 16px);
  inset-inline-end:16px;              /* RTL spiegelt automatisch nach unten links */
  z-index:1035;                        /* über Inhalt, unter Bootstrap-Modal (1055) */
  display:none;                        /* Standard: nur auf mobilen Breiten sichtbar */
  align-items:center; justify-content:center;
  width:56px; height:56px;             /* gut erreichbare Touchfläche */
  border-radius:var(--vm-pill);
  background:var(--vm-primary); color:#fff;
  box-shadow:0 4px 14px rgba(20,30,24,.28);
  text-decoration:none; -webkit-tap-highlight-color:transparent;
  transition:box-shadow .15s ease;
}
.vm-fab:hover,.vm-fab:focus{ background:var(--vm-primary-strong); color:#fff; }
.vm-fab:focus-visible{ outline:3px solid var(--vm-primary-050); outline-offset:2px; }
.vm-fab svg{ width:26px; height:26px; }
.vm-fab.is-boost{ box-shadow:0 6px 20px rgba(20,30,24,.36); }   /* dezent beim Weit-nach-unten-Scrollen */

/* Nur auf Smartphone- und kleinen Tabletbreiten (< lg) einblenden */
@media (max-width:991.98px){
  .vm-fab{ display:flex; }
  .vm-has-fab main{ padding-block-end:calc(env(safe-area-inset-bottom, 0px) + 92px); }
}

/* Ausblenden bei offenem Menü, offenem Modal/Dialog oder Tastatur-Fokus */
.vm-menu-open .vm-fab,
.modal-open .vm-fab,
.vm-typing .vm-fab{ display:none !important; }

/* ===== Dankes-Anrufe: gelber „Anrufe Abarbeiten“-Button (volle Breite, Schatten) ===== */
.btn.tc-cta{
  background:#f2c200; border-color:#e6b800; color:#1e2a23; font-weight:700;
  box-shadow:0 2px 8px rgba(20,30,24,.16);
}
.btn.tc-cta:hover,.btn.tc-cta:focus{
  background:#e6b800; border-color:#d4a900; color:#1e2a23;
  box-shadow:0 3px 10px rgba(20,30,24,.20);
}
.btn.tc-cta:focus-visible{ outline:3px solid #f7de7a; outline-offset:2px; }

/* ===== Mobile Kopfzeile: Logo links · „Apps“ gross zentriert · Menü rechts ===== */
.navbar-vm{ padding-top:calc(.4rem + env(safe-area-inset-top, 0px)); } /* Safe Area (Notch) */
.navbar-left{ display:flex; align-items:center; gap:.5rem; }
@media (max-width:991.98px){
  .navbar-vm .container-fluid{
    display:grid; grid-template-columns:auto 1fr auto; align-items:center; column-gap:.5rem;
  }
  .navbar-vm .navbar-left{ display:contents; }        /* Kinder wandern direkt ins Grid */
  .navbar-vm .navbar-left .navbar-brand{ grid-column:1; margin:0; min-width:0; }
  .navbar-vm .navbar-logo-box{ padding:4px 8px; }     /* kompakter, damit Platz bleibt */
  .navbar-vm .navbar-logo{ height:24px; }
  .navbar-vm .navbar-apps-link{                        /* „Apps“ gross und zentriert */
    grid-column:2; justify-self:center;
    font-size:1.15rem; padding:.4rem .6rem;
  }
  .navbar-vm .navbar-apps-ico{ width:27px; height:27px; }
  .navbar-vm .navbar-module{ display:none; }
  .navbar-vm .navbar-toggler{                          /* Menü-Button rechts, gut greifbar */
    grid-column:3; justify-self:end;
    display:inline-flex; align-items:center; justify-content:center;
    min-width:48px; min-height:48px; border-color:rgba(255,255,255,.55);
  }
  .navbar-vm .navbar-collapse{ grid-column:1 / -1; }   /* Menü öffnet volle Breite darunter */
}

/* Spendenbescheinigung: keine Pflichtfeld-Sterne (alle Angaben werden ohnehin geführt) */
#cert-form .form-label .vm-required,
#cert-form .form-label .text-danger{ display:none; }

/* ---------- Einreise: CHAIR-Einreiseauswahl / Kontrolle ---------- */
.ein-entrylist{ display:flex; flex-direction:column; border:1px solid var(--vm-border);
  border-radius:var(--vm-r); overflow:hidden; }
.ein-entry{ display:flex; align-items:center; gap:.6rem; padding:.6rem .8rem;
  cursor:pointer; margin:0; }
.ein-entry + .ein-entry{ border-top:1px solid var(--vm-border); }
.ein-entry:hover{ background:var(--vm-surface-2); }
.ein-entry input{ flex:0 0 auto; }
.ein-entry-main{ min-width:0; }
.ein-review-sec{ padding:.15rem 0; }

/* ==========================================================================
   Einreise-App Redesign (nur .ein-/.chair- Klassen; keine anderen Module)
   ========================================================================== */
/* Seitenkopf-Aktionen: primär + sekundär, mobil gestapelt */
.ein-head-actions{ display:flex; flex-wrap:wrap; gap:.5rem; }
@media (max-width:575.98px){
  .ein-head-actions{ width:100%; flex-direction:column; }
  .ein-head-actions .btn{ width:100%; }
}
/* Suche mit Symbol */
.ein-search{ max-width:560px; }
.ein-search .input-group-text{ background:var(--vm-surface); border-right:0; }
.ein-search .form-control{ border-left:0; }
@media (max-width:575.98px){ .ein-search{ max-width:none; } }

/* Freundliche Leerwerte */
.ein-empty-val{ color:var(--vm-ink-subtle); font-style:italic; }

/* Formularbreite Desktop */
.ein-form-wrap{ max-width:860px; }

/* --- Auswahlkarten (Grundlage-Wahl, Tierart, Beförderung) --- */
.ein-choicegrid{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
@media (max-width:575.98px){ .ein-choicegrid{ grid-template-columns:1fr; } }
.ein-optioncard{ position:relative; display:flex; gap:.8rem; align-items:flex-start;
  padding:1rem 1.1rem; border:1.5px solid var(--vm-border); border-radius:var(--vm-r-lg);
  background:var(--vm-surface); cursor:pointer; margin:0; transition:border-color .12s, background .12s; }
.ein-optioncard:hover{ border-color:var(--vm-primary); }
.ein-optioncard input{ position:absolute; opacity:0; pointer-events:none; }
.ein-optioncard:has(input:checked){ border-color:var(--vm-primary);
  background:var(--vm-primary-050); box-shadow:inset 0 0 0 1px var(--vm-primary); }
.ein-optioncard .ein-oc-ico{ flex:0 0 auto; width:34px; height:34px; color:var(--vm-primary); }
.ein-optioncard .ein-oc-ico svg{ width:34px; height:34px; }
.ein-oc-title{ font-weight:700; color:var(--vm-ink); display:flex; align-items:center; gap:.4rem; }
.ein-oc-price{ display:inline-block; margin-top:.3rem; font-size:.82rem; font-weight:600;
  color:var(--vm-primary-strong); background:var(--vm-primary-050);
  border-radius:6px; padding:.15rem .5rem; line-height:1.35; }
.ein-oc-desc{ color:var(--vm-ink-muted); font-size:.9rem; margin-top:.3rem; }
.ein-oc-check{ position:absolute; top:.6rem; inset-inline-end:.6rem; width:22px; height:22px;
  border-radius:50%; background:var(--vm-primary); color:#fff; display:none;
  align-items:center; justify-content:center; }
.ein-optioncard:has(input:checked) .ein-oc-check{ display:flex; }
.ein-oc-check svg{ width:14px; height:14px; }

/* --- Auswahl bestehende Einreise (Karten) --- */
.ein-pick{ display:flex; flex-direction:column; gap:.6rem; }
.ein-pickcard{ position:relative; display:block; padding:.8rem 1rem; border:1.5px solid var(--vm-border);
  border-radius:var(--vm-r); background:var(--vm-surface); cursor:pointer; margin:0; }
.ein-pickcard:hover{ border-color:var(--vm-primary); }
.ein-pickcard input{ position:absolute; opacity:0; }
.ein-pickcard:has(input:checked){ border-color:var(--vm-primary); background:var(--vm-primary-050);
  box-shadow:inset 0 0 0 1px var(--vm-primary); }
.ein-pick-name{ font-weight:600; }
.ein-pick-meta{ color:var(--vm-ink-muted); font-size:.85rem; margin-top:.15rem; }
.ein-pick-sel{ display:none; color:var(--vm-primary); font-weight:600; font-size:.8rem;
  margin-top:.35rem; align-items:center; gap:.3rem; }
.ein-pickcard:has(input:checked) .ein-pick-sel{ display:inline-flex; }
.ein-pick-warn{ color:var(--vm-warning-ink); font-size:.8rem; margin-top:.2rem; }

/* --- „Aus Einreise übernommen"-Badge --- */
.ein-src-badge{ display:inline-flex; align-items:center; gap:.3rem; font-size:.72rem;
  padding:.12rem .5rem; border-radius:999px; background:var(--vm-info-bg); color:var(--vm-info-ink);
  border:1px solid #cfe2df; font-weight:600; }
.ein-src-badge svg{ width:12px; height:12px; }

/* --- Mobiler Schritt-Indikator --- */
.ein-stepmob{ display:none; }
@media (max-width:767.98px){
  .ein-steps{ display:none; }
  .ein-stepmob{ display:block; margin-bottom:.75rem; }
  .ein-stepmob-top{ display:flex; justify-content:space-between; align-items:baseline; }
  .ein-stepmob-num{ color:var(--vm-ink-subtle); font-size:.85rem; }
  .ein-stepmob-title{ font-weight:600; font-size:1.05rem; }
  .ein-stepmob-next{ color:var(--vm-ink-subtle); font-size:.8rem; }
}

/* --- Mobil klebende Aktionsleiste --- */
@media (max-width:767.98px){
  .ein-actions-sticky{ position:sticky; bottom:0; z-index:5; background:var(--vm-surface);
    border-top:1px solid var(--vm-border); padding:.7rem; margin:.5rem -1rem -1rem;
    display:flex; gap:.6rem; }
  .ein-actions-sticky .btn{ flex:1; min-height:48px; }
}

/* --- Dokumentkarten (Detail) --- */
.ein-doc{ display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  padding:.8rem 0; }
.ein-doc + .ein-doc{ border-top:1px solid var(--vm-border); }
.ein-doc-ico{ flex:0 0 auto; width:36px; height:36px; border-radius:var(--vm-r);
  background:var(--vm-surface-2); display:flex; align-items:center; justify-content:center; color:var(--vm-primary); }
.ein-doc-ico svg{ width:20px; height:20px; }
.ein-doc-main{ min-width:0; flex:1; }
.ein-doc-title{ font-weight:600; }
.ein-doc-meta{ color:var(--vm-ink-muted); font-size:.82rem; }

/* --- Detail: Info-Kacheln --- */
.ein-facts{ display:flex; flex-wrap:wrap; gap:.4rem 1.2rem; color:var(--vm-ink-muted);
  font-size:.9rem; }
.ein-facts b{ color:var(--vm-ink); font-weight:600; }

/* Download-Aktionen mind. 44px (mobil) */
@media (max-width:767.98px){
  .ein-touch{ min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
}

/* Wizard-Formularkarten auf Desktop nicht über die ganze Breite ziehen */
.vm-main .card:has(> .card-body.ein-form){ max-width:860px; }

/* 3-spaltiges Auswahlraster (Tierart) */
.ein-choicegrid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:.7rem; }
@media (max-width:575.98px){ .ein-choicegrid-3{ grid-template-columns:1fr; } }
/* Kompakte Optionskarte (nur Titel, z. B. Tierart) */
.ein-optioncard.is-compact{ align-items:center; padding:.85rem 1rem; }
/* Gruppen-Überschrift in Formularschritten */
.ein-group-title{ font-weight:600; color:var(--vm-ink); margin:1.1rem 0 .5rem; }
.ein-group-title:first-child{ margin-top:0; }
/* Hervorgehobenes Feld (Buchungsnummer) */
.ein-field-hi{ padding:.8rem; border:1px solid var(--vm-primary); border-radius:var(--vm-r);
  background:var(--vm-primary-050); }

/* Status-Filter-Chips der Einreiseübersicht (Farben je Kategorie) */
.ein-fchips{ display:flex; flex-wrap:wrap; gap:.45rem; margin-bottom:1rem; }
.ein-fchip{ display:inline-flex; align-items:center; padding:.4rem .95rem; border-radius:999px;
  font-size:.9rem; font-weight:600; text-decoration:none; border:2px solid transparent; line-height:1.15; }
.ein-fchip.is-all{ background:#e6f0fb; color:#1b4b7a; }      /* helles Blau */
.ein-fchip.is-draft{ background:#fbf1c9; color:#7a5a00; }    /* helles Gelb */
.ein-fchip.is-done{ background:#dcecdd; color:#245a29; }     /* helles Grün */
.ein-fchip:hover{ filter:brightness(.97); }
.ein-fchip.is-all.active{ border-color:#5a97dd; }
.ein-fchip.is-draft.active{ border-color:#d6b73f; }
.ein-fchip.is-done.active{ border-color:#5fb069; }

/* --- Flugpaten-Auswahl (Schritt 6): Optionen mit Erklärung --- */
.ein-choice-list{ display:flex; flex-direction:column; gap:.6rem; }
.ein-choice{ display:flex; gap:.7rem; align-items:flex-start; padding:.85rem 1rem;
  border:1px solid var(--vm-border); border-radius:var(--vm-r); cursor:pointer; margin:0; }
.ein-choice:has(input:checked){ border-color:var(--vm-primary); background:var(--vm-primary-050); }
.ein-choice input{ margin-top:.2rem; flex:0 0 auto; }
.ein-choice-body{ display:flex; flex-direction:column; }
.ein-choice-title{ font-weight:600; }
.ein-choice-hint{ color:var(--vm-ink-muted); font-size:.85rem; margin-top:.15rem; }

/* --- Schritt „Dokumente": Gruppen, Seitenraster --- */
.ein-doc-group{ scroll-margin-top:84px; }  /* nach Upload auf die Gruppe scrollen, nicht unter die Navbar */
.ein-doc-group .ein-dg-head h2{ display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.ein-pagegrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
  gap:.8rem; margin:.4rem 0 1rem; }
.ein-pagetile{ border:1px solid var(--vm-border); border-radius:var(--vm-r);
  overflow:hidden; background:var(--vm-surface-2); display:flex; flex-direction:column; }
.ein-pagetile-prev{ position:relative; height:150px; display:flex; align-items:center;
  justify-content:center; overflow:hidden; background:#fff; }
.ein-pagetile-prev img{ max-width:100%; max-height:100%; object-fit:contain; }
.ein-pagetile-pdf{ display:flex; flex-direction:column; align-items:center; gap:.3rem;
  color:var(--vm-primary); font-size:.8rem; font-weight:600; }
.ein-pagetile-pdf svg{ width:34px; height:34px; }
.ein-pagetile-num{ position:absolute; top:.3rem; left:.3rem; background:rgba(0,0,0,.6);
  color:#fff; font-size:.72rem; font-weight:600; border-radius:999px; padding:.05rem .5rem; }
.ein-pagetile-actions{ display:flex; gap:.25rem; justify-content:center; padding:.4rem; flex-wrap:wrap; }
.ein-pagetile-actions .btn{ padding:.25rem .45rem; }
.ein-dg-upload{ display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.ein-dg-upload .btn{ cursor:pointer; }

/* --- Zurück-Schaltfläche (Detailseite → Übersicht) --- */
.ein-back{ display:inline-flex; align-items:center; gap:.4rem; font-weight:600; }
.ein-back svg{ flex:0 0 auto; }

/* --- „Speichern" (Entwurf schliessen): hellgraue Schaltfläche --- */
.btn-ein-save{ background:#e9ecef; color:#3a3f45; border:1px solid #ced4da; }
.btn-ein-save:hover,.btn-ein-save:focus{ background:#dde1e6; color:#23272b; border-color:#b8bfc6; }

/* --- Detail: Vollständigkeits-Checkliste (Icon + Text, nicht nur Farbe) --- */
.ein-check li{ font-size:.92rem; }
.ein-check-ok{ color:#245a29; flex:0 0 auto; }
.ein-check-no{ color:#a3320b; flex:0 0 auto; }

/* ==========================================================================
   Tierverwaltung
   ========================================================================== */
.tv-newbtn{ white-space:nowrap; }

/* --- Toolbar (Suche / Filter / Ansicht) --- */
.tv-toolbar{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; margin:0 0 1rem; }
.tv-search{ position:relative; flex:1 1 240px; min-width:0; }
.tv-search svg{ position:absolute; inset-inline-start:.7rem; top:50%; transform:translateY(-50%);
  width:18px; height:18px; color:var(--vm-ink-subtle); pointer-events:none; }
.tv-search input{ width:100%; padding:.6rem .8rem .6rem 2.3rem; border:1px solid var(--vm-border);
  border-radius:var(--vm-r); background:var(--vm-surface); font-size:1rem; min-height:44px; }
html[dir="rtl"] .tv-search input{ padding:.6rem 2.3rem .6rem .8rem; }
.tv-filters{ display:flex; flex-wrap:wrap; gap:.5rem; }
.tv-filters select{ padding:.5rem .7rem; border:1px solid var(--vm-border); border-radius:var(--vm-r);
  background:var(--vm-surface); min-height:44px; }
.tv-viewtoggle{ display:inline-flex; border:1px solid var(--vm-border); border-radius:var(--vm-r); overflow:hidden; }
.tv-viewtoggle button{ background:var(--vm-surface); border:0; padding:.5rem .7rem; cursor:pointer;
  color:var(--vm-ink-muted); min-height:44px; min-width:44px; }
.tv-viewtoggle button svg{ width:20px; height:20px; display:block; }
.tv-viewtoggle button.active{ background:var(--vm-primary); color:#fff; }

/* --- Kartenraster --- */
.tv-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1rem; }
.tv-card{ position:relative; display:flex; flex-direction:column; background:var(--vm-surface); border:1px solid var(--vm-border);
  border-radius:var(--vm-r-lg,14px); overflow:hidden; text-decoration:none; color:inherit;
  box-shadow:0 1px 2px rgba(16,24,40,.04); transition:box-shadow .15s, transform .15s; }
.tv-card:hover{ box-shadow:0 6px 20px rgba(16,24,40,.10); transform:translateY(-2px); }
.tv-card-img{ aspect-ratio:4/3; background:var(--vm-surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.tv-card-img img{ width:100%; height:100%; object-fit:cover; }
.tv-card-body{ padding:.7rem .85rem .85rem; display:flex; flex-direction:column; gap:.35rem; }
.tv-card-top{ display:flex; align-items:baseline; justify-content:space-between; gap:.5rem; }
.tv-card-name{ font-weight:700; font-size:1.02rem; }
.tv-card-nr{ color:var(--vm-ink-subtle); font-size:.78rem; white-space:nowrap; }
.tv-card-meta{ color:var(--vm-ink-muted); font-size:.85rem; display:flex; gap:.35rem; }
.tv-card-foot{ display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin-top:.15rem; }
.tv-card-link{ position:absolute; inset:0; z-index:1; border-radius:inherit; }
.tv-card-actions{ position:relative; z-index:2; display:flex; gap:.3rem; margin-inline-start:auto; }
.tv-qbtn{ width:32px; height:32px; padding:0; border:1px solid var(--vm-border); background:var(--vm-surface);
  border-radius:8px; color:var(--vm-ink-muted); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.tv-qbtn:hover{ color:var(--vm-primary-strong); border-color:var(--vm-primary); background:var(--vm-primary-050); }
.tv-qbtn svg{ width:18px; height:18px; }
.tv-chip{ background:var(--vm-surface-2); color:var(--vm-ink); border-radius:999px; padding:.15rem .6rem; font-size:.78rem; font-weight:600; }
.tv-health{ border-radius:999px; padding:.15rem .6rem; font-size:.78rem; font-weight:600;
  color:var(--c,#555); border:1px solid color-mix(in srgb, var(--c,#8a8f98) 45%, transparent);
  background:color-mix(in srgb, var(--c,#8a8f98) 12%, transparent); }

.tv-thumb-ph{ font-size:2rem; opacity:.5; }
.tv-thumb-ph.is-small{ font-size:1.1rem; }

/* --- Tabelle --- */
.tv-tablewrap{ overflow-x:auto; border:1px solid var(--vm-border); border-radius:var(--vm-r); }
.tv-table{ width:100%; border-collapse:collapse; font-size:.9rem; }
.tv-table th{ text-align:start; padding:.6rem .7rem; color:var(--vm-ink-muted); font-weight:600;
  border-bottom:1px solid var(--vm-border); white-space:nowrap; background:var(--vm-surface-2); }
.tv-table td{ padding:.5rem .7rem; border-bottom:1px solid var(--vm-border); vertical-align:middle; }
.tv-table tbody tr{ cursor:pointer; }
.tv-table tbody tr:hover{ background:var(--vm-surface-2); }
.tv-table td .tv-thumb-ph{ font-size:1.1rem; }
.tv-table td img{ width:34px; height:34px; border-radius:8px; object-fit:cover; }

/* --- Profil --- */
.tv-profile-head{ display:flex; gap:1.1rem; align-items:flex-start; flex-wrap:wrap; margin:0 0 1rem; }
.tv-profile-img{ flex:0 0 auto; width:130px; height:130px; border-radius:var(--vm-r-lg,14px);
  background:var(--vm-surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.tv-profile-img img{ width:100%; height:100%; object-fit:cover; }
.tv-profile-info{ flex:1 1 240px; min-width:0; }
.tv-profile-info h1{ margin:0; }
.tv-profile-nr{ color:var(--vm-ink-subtle); font-size:.9rem; margin:.1rem 0 .5rem; }
.tv-profile-actions{ flex:0 0 auto; }

/* --- Tabs (mobil horizontal scrollbar) --- */
.tv-tabs{ display:flex; gap:.3rem; border-bottom:1px solid var(--vm-border); margin-bottom:1rem;
  overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tv-tabs a{ padding:.6rem .9rem; text-decoration:none; color:var(--vm-ink-muted); font-weight:600;
  white-space:nowrap; border-bottom:2.5px solid transparent; margin-bottom:-1px; }
.tv-tabs a.active{ color:var(--vm-primary); border-bottom-color:var(--vm-primary); }

/* --- Verlauf --- */
.tv-timeline{ list-style:none; margin:0; padding:0; }
.tv-timeline li{ padding:.55rem 0; border-top:1px solid var(--vm-border); display:flex; flex-direction:column; gap:.1rem; }
.tv-timeline li:first-child{ border-top:0; }
.tv-timeline-when{ font-size:.78rem; color:var(--vm-ink-subtle); }
.tv-timeline-who{ font-size:.82rem; }

/* --- Bildergalerie --- */
.tv-imggrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.8rem; }
.tv-imgtile{ position:relative; aspect-ratio:1/1; border-radius:var(--vm-r); overflow:hidden; background:var(--vm-surface-2); }
.tv-imgtile img{ width:100%; height:100%; object-fit:cover; }
.tv-imgtile-main{ position:absolute; inset-block-start:.4rem; inset-inline-start:.4rem;
  background:var(--vm-primary); color:#fff; font-size:.72rem; font-weight:600; border-radius:999px; padding:.1rem .55rem; }
.tv-imgtile img.tv-zoomable{ cursor:zoom-in; }
.tv-imgtile-actions{ position:absolute; inset-block-end:.4rem; inset-inline-end:.4rem; display:flex; gap:.3rem; }
.tv-imgtile-actions .btn{ --bs-btn-color:#fff; --bs-btn-border-color:rgba(255,255,255,.7);
  background:rgba(0,0,0,.45); color:#fff; width:34px; height:34px; padding:0; line-height:1; }
.tv-imgtile-actions .btn:hover{ background:rgba(0,0,0,.7); }
.tv-lightbox{ position:fixed; inset:0; z-index:1080; background:rgba(0,0,0,.88);
  display:flex; align-items:center; justify-content:center; padding:24px; cursor:zoom-out; }
.tv-lightbox[hidden]{ display:none; }
.tv-lightbox img{ max-width:96vw; max-height:92vh; object-fit:contain; border-radius:6px; box-shadow:0 6px 30px rgba(0,0,0,.5); }
.tv-lightbox-close{ position:absolute; inset-block-start:14px; inset-inline-end:18px; background:none;
  border:none; color:#fff; font-size:34px; line-height:1; cursor:pointer; }
.tv-genderopt:has(input:checked){ border-color:var(--vm-primary); background:var(--vm-primary-050); color:var(--vm-primary-strong); }
.tv-locopt:has(input:checked){ border-color:var(--vm-primary); background:var(--vm-primary-050); color:var(--vm-primary-strong); }

@media (max-width:575.98px){
  .tv-grid{ grid-template-columns:1fr 1fr; gap:.7rem; }
  .tv-toolbar{ gap:.5rem; }
  .tv-filters{ width:100%; }
  .tv-filters select{ flex:1 1 45%; }
}

/* --- Tierverwaltung: Erfassungsassistent --- */
.tv-wiz{ max-width:720px; }
.tv-wizsteps{ list-style:none; display:flex; flex-wrap:wrap; gap:.4rem 1rem; padding:0; margin:0 0 1.25rem; }
.tv-wizsteps li{ display:flex; align-items:center; gap:.45rem; color:var(--vm-ink-subtle); font-size:.9rem; font-weight:600; }
.tv-wizsteps li span{ width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
  background:var(--vm-surface-2); color:var(--vm-ink-muted); font-size:.8rem; }
.tv-wizsteps li.is-cur{ color:var(--vm-ink); }
.tv-wizsteps li.is-cur span{ background:var(--vm-primary); color:#fff; }
.tv-wizsteps li.is-done span{ background:color-mix(in srgb,var(--vm-primary) 20%, transparent); color:var(--vm-primary-strong); }

.tv-wizimg-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:.7rem; margin-bottom:1rem; }
.tv-wizimg{ position:relative; border-radius:var(--vm-r); overflow:hidden; border:2px solid transparent; background:var(--vm-surface-2); }
.tv-wizimg.is-main{ border-color:var(--vm-primary); }
.tv-wizimg img{ width:100%; aspect-ratio:1/1; object-fit:cover; display:block; }
.tv-wizimg-badge{ position:absolute; inset-block-start:.3rem; inset-inline-start:.3rem; background:var(--vm-primary);
  color:#fff; font-size:.7rem; font-weight:600; border-radius:999px; padding:.05rem .5rem; }
.tv-wizimg-actions{ position:absolute; inset-block-end:0; inset-inline:0; display:flex; gap:.2rem; justify-content:center;
  padding:.3rem; background:linear-gradient(transparent, rgba(0,0,0,.45)); }
.tv-wizimg-actions .btn{ padding:.2rem .4rem; background:rgba(255,255,255,.92); }
.tv-wizupload{ display:flex; flex-wrap:wrap; gap:.5rem; }
.tv-wizupload .btn{ cursor:pointer; min-height:48px; }

.tv-genderpick{ display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; margin:.5rem 0; }
.tv-genderopt{ display:flex; align-items:center; justify-content:center; min-height:60px; padding:.6rem;
  border:1.5px solid var(--vm-border); border-radius:var(--vm-r); cursor:pointer; font-weight:600; text-align:center; margin:0; }
.tv-genderopt input{ position:absolute; opacity:0; width:0; height:0; }
.tv-genderopt.is-sel{ border-color:var(--vm-primary); background:var(--vm-primary-050); color:var(--vm-primary-strong); }

.tv-namerow{ display:flex; gap:.5rem; align-items:stretch; }
.tv-namerow input{ flex:1; }
.tv-suggest{ display:inline-flex; align-items:center; gap:.35rem; white-space:nowrap; }
@media (max-width:480px){ .tv-suggest-txt{ display:none; } }

.tv-wiznav{ display:flex; gap:.6rem; margin-top:1.5rem; }
.tv-wiznav .btn{ flex:1; min-height:52px; }
.tv-wiznav--split{ justify-content:space-between; }
.tv-wiznav--split > .btn, .tv-wiznav--split > div{ flex:0 0 auto; }
@media (max-width:575.98px){
  .tv-genderpick{ grid-template-columns:1fr; }
  .tv-wiznav--split{ flex-direction:column; }
  .tv-wiznav--split > div{ display:flex; }
  .tv-wiznav--split .btn{ width:100%; }
}

/* ==========================================================================
   Kalender
   ========================================================================== */
.cal-head{ display:flex; align-items:center; gap:.5rem; margin-bottom:.75rem; }
.cal-title{ font-size:1.15rem; margin:0; font-weight:700; flex:0 0 auto; min-width:9.5rem; text-align:center; }
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:var(--vm-border);
  border:1px solid var(--vm-border); border-radius:var(--vm-r); overflow:hidden; }
.cal-wd{ background:var(--vm-surface-2); text-align:center; font-size:.75rem; font-weight:600;
  color:var(--vm-ink-muted); padding:.4rem 0; }
.cal-cell{ background:var(--vm-surface); min-height:92px; padding:.25rem; display:flex; flex-direction:column; gap:2px; }
.cal-cell.is-out{ background:var(--vm-surface-2); }
.cal-cell.is-out .cal-day{ color:var(--vm-ink-subtle); }
.cal-cell.is-today{ box-shadow:inset 0 0 0 2px var(--vm-primary); }
.cal-day{ align-self:flex-end; font-size:.8rem; color:var(--vm-ink-muted); text-decoration:none; font-weight:600;
  width:1.6rem; height:1.6rem; display:grid; place-items:center; border-radius:50%; }
.cal-cell.is-today .cal-day{ background:var(--vm-primary); color:#fff; }
a.cal-day:hover{ background:var(--vm-primary-050); }
.cal-ev{ font-size:.72rem; line-height:1.2; border-radius:5px; padding:.1rem .3rem; text-decoration:none;
  color:#fff; background:var(--cat,#757575); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-ev.is-done{ opacity:.55; text-decoration:line-through; }

/* Kategorie-Farben */
.cat-medikament{ --cat:#6a5acd; } .cat-impfung{ --cat:#2e7d32; } .cat-nachkontrolle{ --cat:#0277bd; }
.cat-operation{ --cat:#c62828; } .cat-kastration{ --cat:#ad1457; } .cat-tierarzt{ --cat:#00838f; }
.cat-sonstiges{ --cat:#6b7280; }
.cal-ev{ background:var(--cat,#6b7280); }
.cal-dot{ width:9px; height:9px; border-radius:50%; background:var(--cat,#6b7280); display:inline-block; flex:0 0 auto; }

/* Terminliste */
.cal-list{ list-style:none; margin:0; padding:0; }
.cal-list-item{ display:flex; gap:.7rem; padding:.6rem .2rem; border-top:1px solid var(--vm-border); text-decoration:none; color:inherit; }
.cal-list li:first-child .cal-list-item{ border-top:0; }
.cal-list-item:hover{ background:var(--vm-surface-2); }
.cal-list-item.is-done{ opacity:.6; }
.cal-list-date{ flex:0 0 auto; text-align:center; min-width:3rem; display:flex; flex-direction:column; }
.cal-list-date small{ color:var(--vm-ink-subtle); }
.cal-list-title{ font-weight:600; display:flex; align-items:center; gap:.4rem; }
.cal-list-meta{ font-size:.8rem; color:var(--vm-ink-muted); }

@media (max-width:575.98px){
  .cal-cell{ min-height:60px; }
  .cal-ev{ font-size:0; padding:0; height:7px; border-radius:3px; }  /* mobil: nur Farbstreifen */
  .cal-ev b{ display:none; }
}

/* --- Tierverwaltung: Medizin-Liste --- */
.med-item{ display:flex; gap:.75rem; justify-content:space-between; align-items:flex-start;
  padding:.7rem 0; border-top:1px solid var(--vm-border); }
.med-item:first-of-type{ border-top:0; }
.med-item-main{ min-width:0; flex:1; }
.med-item-actions{ display:flex; gap:.3rem; flex:0 0 auto; }
.med-files{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.4rem; }
.med-file{ display:inline-flex; align-items:center; gap:.25rem; background:var(--vm-surface-2);
  border:1px solid var(--vm-border); border-radius:999px; padding:.1rem .3rem .1rem .6rem; font-size:.8rem; }
.med-file a{ text-decoration:none; }
.med-file-open{ max-width:16rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.med-file form{ display:inline; }
.med-file button{ border:0; background:transparent; color:var(--vm-danger); cursor:pointer; line-height:1; padding:0 .2rem; }

/* --- Tierverwaltung: Duplikate/Merge --- */
.dup-group{ display:flex; flex-direction:column; gap:.4rem; }
.dup-t{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.merge-row{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:.5rem; align-items:center;
  padding:.5rem 0; border-top:1px solid var(--vm-border); }
.merge-label{ font-weight:600; font-size:.9rem; }
.merge-opt{ display:flex; align-items:center; gap:.4rem; padding:.4rem .6rem; border:1px solid var(--vm-border);
  border-radius:var(--vm-r); cursor:pointer; margin:0; font-size:.9rem; }
.merge-opt:has(input:checked){ border-color:var(--vm-primary); background:var(--vm-primary-050); }
@media (max-width:575.98px){ .merge-row{ grid-template-columns:1fr; } }

/* --- Trello-Import: Check --- */
.tv-check-img{ aspect-ratio:4/3; background:var(--vm-surface-2); border-radius:var(--vm-r-lg,14px);
  overflow:hidden; display:flex; align-items:center; justify-content:center; }
.tv-check-img img{ width:100%; height:100%; object-fit:contain; }
.tv-check-thumbs{ display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.5rem; }
.tv-check-thumbs img{ width:56px; height:56px; object-fit:cover; border-radius:8px; cursor:pointer;
  border:2px solid transparent; }
.tv-check-thumbs img:hover{ border-color:var(--vm-primary); }
.tv-locpick{ display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:.5rem; }
.tv-locopt{ display:flex; align-items:center; justify-content:center; min-height:52px; padding:.5rem;
  border:1.5px solid var(--vm-border); border-radius:var(--vm-r); cursor:pointer; text-align:center;
  font-weight:600; margin:0; }
.tv-locopt input{ position:absolute; opacity:0; width:0; height:0; }
.tv-locopt.is-sel{ border-color:var(--vm-primary); background:var(--vm-primary-050); color:var(--vm-primary-strong); }

/* WhatsApp-Erinnerungen (Vereinsgrün, dezent) */
.wa-card{ border-color:var(--vm-primary); }
.wa-title{ color:var(--vm-primary-strong); }
.cal-wa{ display:inline-flex; vertical-align:middle; color:var(--vm-primary); }
.cal-wa.is-sent{ color:var(--vm-primary-strong); }
.cal-wa.is-error{ color:#b02a2a; }
.cal-wa-badge{ display:inline-flex; align-items:center; gap:.25rem; font-size:.72rem;
  color:var(--vm-primary-strong); background:var(--vm-primary-050); border-radius:6px;
  padding:.05rem .4rem; margin-top:.15rem; width:fit-content; }
.cal-wa-badge.is-error{ color:#b02a2a; background:#fdecec; }
