/* verwaltung.css — Verwaltungs-Bereiche (Verträge · Objekte · Stammdaten · Einstellungen)
   Lädt nur Immobilienverwaltung-Kundenversion.html. Erbt Tokens aus styles.css. */

/* ── Page shell ─────────────────────────────────────────────── */
.vw { padding-bottom: 96px; opacity: 1; animation: vwFade .3s cubic-bezier(.22,.61,.36,1) both; }
@keyframes vwFade { from { transform: translateY(8px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .vw { animation: none; } }

.vw-head { margin: 4px 0 22px; }
.vw-head h1 { font-size: 30px; margin: 0; letter-spacing: -0.025em; font-weight: 800; }
.vw-head p { color: var(--ink-3); margin: 6px 0 0; font-size: 16px; }

/* ── Toolbar (segmented + primary action) ───────────────────── */
.vw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

.vw-seg { display: inline-flex; align-items: center; gap: 4px; padding: 5px; background: #EEF1F5; border-radius: 12px; }
.vw-seg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 16px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600;
  transition: all .14s ease;
}
.vw-seg-btn:hover { color: var(--ink); }
.vw-seg-btn.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.10), 0 0 0 1px rgba(15,23,42,.04); }

.vw-btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 22px; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px var(--accent-line); transition: all .14s ease;
}
.vw-btn-primary:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 6px 16px var(--accent-line); }

/* ── Stat cards ─────────────────────────────────────────────── */
.vw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.vw-stat {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
}
.vw-stat-ico {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.vw-stat-ico.is-orange { background: #FCEDD9; color: #E07B12; }
.vw-stat-ico.is-green  { background: #E4F5EA; color: #1F9D57; }
.vw-stat-ico.is-amber  { background: #FBEAD2; color: #D98014; }
.vw-stat-ico.is-blue   { background: #E6EEFB; color: #3B74D6; }
.vw-stat-ico.is-purple { background: #EFE9FB; color: #7C4DD6; }
.vw-stat-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); white-space: nowrap; }
.vw-stat { min-width: 0; }
.vw-stat > div { min-width: 0; }
.vw-stat-label { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.vw-stat-hint { font-size: 12px; color: var(--ink-2); margin-top: 2px; } /* Audit C1: sagt, was die Zahl zählt */

/* Stat-Kacheln als Filter (klickbar) */
button.vw-stat { font: inherit; text-align: left; width: 100%; color: inherit; appearance: none; }
.vw-stat.is-clickable { cursor: pointer; transition: transform .14s ease; }
.vw-stat.is-clickable:hover { border-color: #D5DDE8; box-shadow: 0 6px 18px rgba(15,23,42,.06); transform: translateY(-1px); }
.vw-stat.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vw-stat.is-active:hover { box-shadow: 0 0 0 3px var(--accent-soft), 0 6px 18px rgba(15,23,42,.06); }

/* ── Filter bar ─────────────────────────────────────────────── */
.vw-filterbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.vw-search { flex: 1; position: relative; display: flex; align-items: center; }
.vw-search svg { position: absolute; left: 16px; color: var(--ink-3); pointer-events: none; }
.vw-search input {
  width: 100%; font: inherit; font-size: 14px;
  height: 50px; padding: 0 16px 0 44px;
  background: #EEF1F5; border: 1px solid transparent; border-radius: 12px; color: var(--ink);
  outline: none; transition: all .14s ease;
}
.vw-search input::placeholder { color: var(--ink-3); }
.vw-search input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.vw-filter {
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.vw-filter:hover { border-color: var(--ink-3); }
.vw-filter .vw-filter-ico { color: var(--ink-3); }
.vw-filter .vw-filter-chev { color: var(--ink-3); margin-left: 2px; }

.vw-viewtoggle { display: inline-flex; gap: 6px; }
.vw-vt-btn {
  width: 50px; height: 50px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink-3); display: flex; align-items: center; justify-content: center;
  transition: all .14s ease;
}
.vw-vt-btn:hover { border-color: var(--ink-3); color: var(--ink-2); }
.vw-vt-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Card grid ──────────────────────────────────────────────── */
.vw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 22px; }
.vw-grid.is-list { grid-template-columns: 1fr; }

.vw-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px;
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.vw-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.07); border-color: #D5DDE8; transform: translateY(-2px); }

.vw-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.vw-card-ico {
  width: 52px; height: 52px; border-radius: 14px; background: #FCEDD9; color: #E07B12;
  display: flex; align-items: center; justify-content: center;
}
.vw-card-ico.is-blue   { background: #E6EEFB; color: #3B74D6; }
.vw-card-ico.is-purple { background: #EFE9FB; color: #7C4DD6; }
.vw-card-ico.is-amber  { background: #FBEAD2; color: #D98014; }
.vw-badge {
  font-size: 12px; font-weight: 600; padding: 5px 13px; border-radius: 999px; white-space: nowrap;
}
.vw-badge.is-entwurf { background: #EAF1FB; color: #3B6FB8; }
.vw-badge.is-freigabe { background: #EFE9FB; color: #6B46C1; }
.vw-badge.is-aktiv { background: #E4F5EA; color: #1F8A4D; }
.vw-badge.is-auslaufend { background: #FBEAD2; color: #B5710F; }
.vw-badge.is-abgelaufen { background: #FDEAEA; color: #B4232A; }
.ein-demo-hint {
  display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: 10px; padding: 9px 13px; font-size: 13px; color: var(--ink-2);
}
.ein-demo-hint svg { color: var(--accent); flex-shrink: 0; }

/* Design-Auswahl (Standard / Seriös) */
.ein-design-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 540px; }
.ein-design-opt {
  position: relative; display: flex; flex-direction: column; gap: 0; text-align: left;
  font-family: inherit; cursor: pointer; padding: 0; overflow: hidden;
  background: #fff; border: 1.5px solid var(--line); border-radius: 13px; transition: all .14s;
}
.ein-design-opt:hover { border-color: var(--accent-line); }
.ein-design-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ein-design-prev { height: 92px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 7px; border-bottom: 1px solid var(--line-2); }
.ein-prev-standard { background: #F8FAFC; }
.ein-prev-serioes { background: #FAFBFB; }
.ein-prev-h { font-size: 24px; font-weight: 800; color: #0F172A; letter-spacing: -0.02em; line-height: 1; }
.ein-prev-serif { font-family: "Source Serif Pro", Georgia, serif; font-size: 24px; font-weight: 600; color: #1A1F26; line-height: 1; }
.ein-prev-eyebrow { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.18em; color: var(--accent); font-weight: 500; }
.ein-prev-l1, .ein-prev-l2 { height: 5px; border-radius: 999px; background: #E2E8F0; }
.ein-prev-l1 { width: 70%; } .ein-prev-l2 { width: 45%; }
.ein-prev-serioes .ein-prev-l1, .ein-prev-serioes .ein-prev-l2 { background: #E7E9EC; }
.ein-design-meta { padding: 11px 16px 13px; display: flex; flex-direction: column; gap: 2px; }
.ein-design-meta strong { font-size: 14px; color: var(--ink); }
.ein-design-meta span { font-size: 12px; color: var(--ink-3); }
.ein-design-check {
  position: absolute; top: 11px; right: 11px; width: 24px; height: 24px; border-radius: 999px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
}

/* ── Status-Badge mit Menü (v7) ──────────────────────── */
.vw-badge-wrap { position: relative; }
button.vw-badge.is-menu {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; border: 0; cursor: pointer;
}
button.vw-badge.is-menu svg { opacity: .65; }
.vw-badge-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  width: 250px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 8px; text-align: left;
}
.vw-badge-menu-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 4px 8px 6px; }
.vw-badge-menu-item {
  display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left;
  font-family: inherit; background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; cursor: pointer;
}
.vw-badge-menu-item:hover { background: var(--line-2); }
.vw-badge-menu-item.active { background: var(--accent-soft); }
.vw-badge-menu-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.vw-badge-menu-item.active .vw-badge-menu-name { color: var(--accent); }
.vw-badge-menu-sub { font-size: 12px; color: var(--ink-3); }
.vw-badge-menu-hint { font-size: 11px; color: var(--ink-3); line-height: 1.45; padding: 8px 8px 4px; border-top: 1px solid var(--line-2); margin-top: 6px; }
.vw-badge-menu.is-fixed { position: fixed; right: auto; z-index: 1000; }

/* Muster-Chip + Ende-Hinweis */
.vw-muster-chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.vw-ende-hint {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  margin-left: 8px; white-space: nowrap;
}
.vw-ende-hint.is-warn { background: #FBEAD2; color: #B5710F; }
.vw-ende-hint.is-over { background: #FDEAEA; color: #B4232A; }

/* Duplizieren-Button im Karten-Fuß */
.vw-dup {
  width: 44px; flex: none; display: flex; align-items: center; justify-content: center;
  font-family: inherit; background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: all .12s;
}
.vw-dup:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ── Vertragstabelle (echte Listenansicht) ─────────────────── */
.vw-table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); overflow-x: auto;
}
.vw-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.vw-table thead th {
  text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line);
  background: #FAFBFC; white-space: nowrap;
}
.vw-table thead th:first-child { padding-left: 16px; border-top-left-radius: 14px; }
.vw-th {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); background: none; border: 0; padding: 6px 2px; cursor: pointer;
}
.vw-th:hover, .vw-th.active { color: var(--ink); }
.vw-th-arrow { font-size: 11px; color: var(--accent); width: 10px; }
.vw-table tbody tr { border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .1s; }
.vw-table tbody tr:last-child { border-bottom: 0; }
.vw-table tbody tr:hover { background: color-mix(in oklab, var(--accent-soft) 45%, transparent); }
.vw-table td { padding: 12px 10px; font-size: 14px; color: var(--ink-2); vertical-align: middle; }
.vw-table td:first-child { padding-left: 16px; }
.vw-td-strong { font-weight: 700; color: var(--ink); }
.vw-td-actions { white-space: nowrap; text-align: right; padding-right: 12px; }
.vw-row-act {
  width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; background: none; border: 0; color: var(--ink-3); cursor: pointer; transition: all .12s;
}
.vw-row-act:hover { background: var(--line-2); color: var(--ink); }
.vw-row-act.is-danger:hover { background: #FDEAEA; color: #B4232A; }

.vw-card-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; margin-bottom: 12px; }
.vw-card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.vw-card-subtitle { font-size: 14px; color: var(--ink-2); margin-top: 2px; margin-bottom: 6px; }

.vw-rows { display: flex; flex-direction: column; gap: 9px; }
.vw-row { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink-2); }
.vw-row svg { flex-shrink: 0; color: var(--ink-3); }
.vw-row-strong { font-size: 16px; font-weight: 700; color: var(--ink); }
.vw-row-muted { color: var(--ink-3); }

.vw-div { border-top: 1px solid var(--line-2); margin: 16px 0; }

.vw-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; }
.vw-kv-label { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.vw-kv-label svg { color: var(--ink-3); }
.vw-kv-val { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.vw-kv-val.accent { color: var(--accent); }
.vw-kv-val.muted { color: var(--ink-3); font-weight: 600; }

.vw-card-spacer { flex: 1; min-height: 14px; }
.vw-card-meta { text-align: right; font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 4px 0 16px; }
.vw-card-meta strong { display: block; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.vw-card-foot { display: flex; gap: 12px; align-items: center; }
.vw-edit {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  transition: all .14s ease;
}
.vw-edit:hover { background: var(--line-2); border-color: #D5DDE8; }
.vw-trash {
  width: 50px; height: 46px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: #DC2626;
  display: flex; align-items: center; justify-content: center; transition: all .14s ease;
}
.vw-trash:hover { background: #FEF2F2; border-color: #FCA5A5; }

/* ── Object-specific ────────────────────────────────────────── */
.vw-objrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.vw-typebadge {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.vw-vcount { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-3); }
.vw-vcount svg { color: var(--ink-3); }
.vw-gb { font-size: 14px; color: var(--ink-3); line-height: 1.55; }

/* ── Empty state (search / Stammdaten) ──────────────────────── */
.vw-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 64px 24px; color: var(--ink-3);
  border: 1.5px dashed var(--line); border-radius: 18px; background: #fff;
}
.vw-empty-ico { width: 64px; height: 64px; border-radius: 18px; background: var(--line-2); color: var(--ink-3); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.vw-empty h3 { font-size: 20px; color: var(--ink-2); margin: 0 0 6px; font-weight: 700; }
.vw-empty p { font-size: 14px; margin: 0 auto; max-width: 46ch; line-height: 1.55; }
.vw-empty .vw-btn-primary { margin-top: 22px; }

/* ── Muster (Vertragsmuster tab) ────────────────────────────── */
.vw-muster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 22px; }
.vw-muster {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  transition: box-shadow .16s ease, transform .16s ease;
}
.vw-muster:hover { box-shadow: 0 10px 28px rgba(15,23,42,.07); transform: translateY(-2px); }
.vw-muster-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--mc, var(--accent)); margin-bottom: 12px; }
.vw-muster-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.vw-muster-regime { font-size: 13px; font-weight: 600; color: var(--mc, var(--accent)); margin-top: 3px; }
.vw-muster-desc { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 12px 0 18px; flex: 1; text-wrap: pretty; }
.vw-muster-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vw-muster-ver { font-size: 12px; color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.vw-muster-use {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px;
  border: 1px solid var(--accent-line); border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  font: inherit; font-size: 13px; font-weight: 600; transition: all .14s ease;
}
.vw-muster-use:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Settings ───────────────────────────────────────────────── */
.vw-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px 30px; margin-bottom: 22px; }
.vw-panel h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 22px; }
.vw-formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.vw-field { display: flex; flex-direction: column; gap: 8px; }
.vw-field.full { grid-column: 1 / -1; }
.vw-field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.vw-input, .vw-select {
  font: inherit; font-size: 14px; height: 50px; padding: 0 16px;
  background: #EEF1F5; border: 1px solid transparent; border-radius: 11px; color: var(--ink);
  outline: none; transition: all .14s ease; width: 100%;
}
.vw-input::placeholder { color: var(--ink-3); }
.vw-input:focus, .vw-select:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vw-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }

.vw-panel-foot { display: flex; justify-content: flex-end; margin-top: 24px; }
.vw-btn-save {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 22px;
  border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  box-shadow: 0 1px 2px var(--accent-line); transition: all .14s ease;
}
.vw-btn-save:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 6px 16px var(--accent-line); }
.vw-btn-outline {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  transition: all .14s ease;
}
.vw-btn-outline:hover { background: var(--line-2); border-color: #D5DDE8; }
.vw-panel-actions { display: flex; }

/* Toolbar-Aktionsgruppe (zwei Buttons rechts) */
.vw-toolbar-acts { display: flex; gap: 10px; align-items: center; }
@media (max-width: 720px) { .vw-toolbar-acts { flex-wrap: wrap; justify-content: flex-end; } }

/* Musterabfrage-Link teilen */
.vw-modal.vw-sharemodal { max-width: 720px; }
.vw-share-lede { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0 0 18px; }
.vw-share-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.vw-share-linkrow { display: flex; gap: 10px; }
.vw-share-input { flex: 1; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; }
.vw-share-linkrow .vw-btn-primary { flex-shrink: 0; }
.vw-share-hint { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ── Chrome tweaks (divider + brand order) ──────────────────── */
.chrome-div { width: 1px; height: 26px; background: var(--line); margin: 0 6px; }

/* ── Chrome-Menü (Burger-Dropdown) ──────────────────────────── */
.chrome-menu-wrap { position: relative; }
.chrome-burger.is-open { background: var(--accent-soft); border-color: var(--accent-line); }
.chrome-menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 120;
  min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,.16); padding: 8px;
  animation: chromeMenuIn .14s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes chromeMenuIn { from { transform: translateY(-6px); } to { transform: none; } }
.chrome-menu-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 12px 6px; }
.chrome-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background .12s ease;
}
.chrome-menu-item svg { color: var(--ink-3); flex-shrink: 0; }
.chrome-menu-item:hover { background: var(--line-2); }
.chrome-menu-item.active { color: var(--accent); }
.chrome-menu-item.active svg { color: var(--accent); }
.chrome-menu-item.is-accent { color: var(--accent); }
.chrome-menu-item.is-accent svg { color: var(--accent); }
.chrome-menu-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); }
.chrome-menu-sep { height: 1px; background: var(--line-2); margin: 6px 4px; }

/* ── Vertrag-Speichern-Button (Generator) ───────────────────── */
.gen-save-fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 95;
  display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px;
  border: 0; border-radius: 14px; background: var(--accent); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-line), 0 2px 6px rgba(15,23,42,.12);
  transition: transform .14s ease, filter .14s ease;
}
.gen-save-fab svg { color: #fff; }
.gen-save-fab:hover { filter: brightness(1.05); transform: translateY(-2px); }

/* ── Modal / Confirm ────────────────────────────────────────── */
.vw-modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,23,42,.36); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: vwMaskIn .16s ease;
}
@keyframes vwMaskIn { from { opacity: 0; } to { opacity: 1; } }
.vw-modal {
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15,23,42,.24);
  width: 100%; max-width: 440px; animation: vwModalIn .2s cubic-bezier(.22,.61,.36,1);
}
@keyframes vwModalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.vw-confirm { text-align: center; padding: 30px 28px 24px; }
.vw-confirm-ico { width: 52px; height: 52px; border-radius: 14px; background: #FEF2F2; color: #DC2626; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.vw-confirm h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.vw-confirm p { font-size: 14px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.55; }
.vw-confirm-foot { display: flex; gap: 12px; justify-content: center; }
.vw-btn-danger {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px;
  border: 0; border-radius: 12px; background: #DC2626; color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  transition: all .14s ease;
}
.vw-btn-danger:hover { background: #B91C1C; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(220,38,38,.28); }

@media (max-width: 900px) {
  .vw-stats { grid-template-columns: 1fr 1fr; }
  .vw-formgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .vw-stats { grid-template-columns: 1fr; }
  .vw-grid, .vw-muster-grid { grid-template-columns: 1fr; }
}


/* ── Einstellungen → Daten (Demo-Modus + Datensicherung) ── */
.ein-desc { font-size: 14px; color: #5B6573; line-height: 1.55; margin: 2px 0 14px; max-width: 620px; }
.ein-hint { font-size: 13px; color: #8A94A6; margin: 10px 0 0; }
.ein-hint b { color: #1E2630; }
.ein-backup-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.ein-restore-confirm { margin-top: 14px; background: #FFF7ED; border: 1px solid #F78E1133; border-radius: 10px; padding: 12px 14px; }
.ein-restore-confirm p { font-size: 13px; color: #5B4A2F; line-height: 1.5; margin: 0 0 10px; }

/* ── Benutzer & Rollen (Einstellungen → Benutzer) ───────────────────────── */
.ein-user-list { display: flex; flex-direction: column; }
.ein-user-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
.ein-user-row:last-child { border-bottom: none; }
.ein-user-id { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ein-user-name { font-weight: 600; font-size: 14px; }
.ein-user-mail { font-size: 13px; opacity: 0.65; overflow: hidden; text-overflow: ellipsis; }
.ein-user-role { max-width: 240px; }
.ein-role-list { display: flex; flex-direction: column; gap: 12px; }
.ein-role-row { display: flex; flex-direction: column; gap: 3px; }
.ein-role-row strong { font-size: 14px; }
.ein-role-row span { font-size: 13px; opacity: 0.7; line-height: 1.5; }

/* Abmelden-Knopf in der Mitarbeiter-Ansicht (Rolle „Mitarbeiter") */
.emp-logout {
  position: fixed; top: 14px; right: 14px; z-index: 60;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.14);
  background: #fff; color: #444; font: 600 13px/1 inherit; font-family: inherit;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.emp-logout:hover { border-color: rgba(0,0,0,0.28); color: #111; }

/* ── Änderungshistorie je Vertrag (Modal) ──────────────────────────────── */
.vw-histmodal { max-width: 560px; }
.vw-hist-list { display: flex; flex-direction: column; }
.vw-hist-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.vw-hist-row:last-child { border-bottom: none; }
.vw-hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #F78E11); margin-top: 6px; flex: none; }
.vw-hist-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vw-hist-ev { font-size: 14px; font-weight: 600; }
.vw-hist-sub { font-weight: 400; opacity: 0.75; }
.vw-hist-meta { font-size: 12px; opacity: 0.6; }

/* Leere Listen (Audit D7): Schaltflächen für den ersten Schritt. */
.vw-empty-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.vw-empty .vw-empty-acts .vw-btn-primary { margin-top: 0; }

/* Leere Listen (Audit D7): Schaltflächen für den ersten Schritt. */
.vw-empty-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.vw-empty .vw-empty-acts .vw-btn-primary { margin-top: 0; }
.ein-restore-error { background: #FEF2F2; border-color: #FCA5A5; } .ein-restore-error p { color: #7F1D1D; }
/* Funktions-Audit V12: weitere Mieter auf Karte und in der Tabelle */
.vw-row-sub { font-size: 14px; color: var(--ink-3); }
.vw-td-sub { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
