@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════
   Smart-ID Design-System (seit 2026-09-06)

   Eine Schrift (IBM Plex Sans), ein Blau (#0052D2 aus dem Logo),
   drei Button-Stufen (Primär / Sekundär / Tertiär), flache Karten,
   Radien 6 px (Bedienelemente) und 8 px (Karten), keine Schatten
   auf Buttons, keine Verläufe.

   Wie das aussieht und wann man was nimmt: docs/design-guide.html —
   die Seite lädt diese Datei, kann also nicht veralten.
   Entstehungsgeschichte: docs/design-entwurf/.

   Aufbau dieser Datei:
   1. Tokens, Basis, Topbar, Buttons, Karten, Sidebar (dieser Kopf)
   2. Seiten- und Feature-CSS (historisch gewachsen)
   3. „Harmonisierung"-Block am Ende: überschreibt Komponenten aus
      Teil 2, damit alle Seiten dieselben Tabellen, Badges,
      Formularfelder und Dialoge benutzen. Neue Seiten benutzen die
      Klassen aus Teil 1 direkt.
   ═══════════════════════════════════════════════════════════════ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Markenfarbe */
  --primary: #0052d2;
  --primary-dark: #0046b4;
  --primary-active: #003b96;
  --primary-light: #ebf1fc;
  --primary-light-border: #b9cff3;

  /* Statusfarben */
  --success: #1f8a4c;
  --success-light: #e7f5ec;
  --warning: #b3620d;
  --warning-light: #fdf1e1;
  --danger: #c42b2b;
  --danger-dark: #a82323;
  --danger-light: #fbeaea;

  /* Neutrale Skala (kühl, ungetönt) */
  --gray-50:  #f8f9fa;
  --gray-100: #f1f2f4;
  --gray-200: #e3e6ea;
  --gray-300: #c8ccd3;
  --gray-400: #a3a9b3;
  --gray-500: #8a919d;
  --gray-600: #5b6270;
  --gray-700: #3d4452;
  --gray-800: #2a303b;
  --gray-900: #1b1f27;

  /* Semantische Aliase */
  --bg: #f4f5f7;
  --bg-card: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --border: #e3e6ea;
  --border-strong: #c8ccd3;
  --text: #1b1f27;
  --text-2: #5b6270;
  --text-3: #8a919d;
  --text-secondary: #5b6270;
  --text-muted: #8a919d;
  --card-bg: #ffffff;

  /* Sidebar (hell) */
  --sidebar-bg: #ffffff;
  --sidebar-bg-hover: #eceef1;
  --sidebar-bg-active: #ebf1fc;
  --sidebar-text: #3d4452;
  --sidebar-text-muted: #5b6270;
  --sidebar-text-active: #0052d2;
  --sidebar-border: #e3e6ea;
  --sidebar-accent: #0052d2;

  /* Layout */
  --topbar-h: 52px;
  --sidebar-w: 240px;
  --sidebar-w-collapsed: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 8px;
  --radius-badge: 4px;
  --shadow: none;
  --shadow-md: 0 8px 24px rgba(27,31,39,0.12), 0 1px 3px rgba(27,31,39,0.08);
  --shadow-lg: 0 8px 24px rgba(27,31,39,0.12), 0 1px 3px rgba(27,31,39,0.08);
  --shadow-pop: 0 8px 24px rgba(27,31,39,0.12), 0 1px 3px rgba(27,31,39,0.08);
  --focus-ring: 0 0 0 3px var(--primary-light);
  --font: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-weight: 600; color: var(--gray-900); line-height: 1.3; }
button, input, select, textarea { font-family: inherit; }
svg { flex-shrink: 0; }

.container { max-width: 1500px; margin: 0 auto; padding: 0 1.75rem; }
.main-content > .container { padding-top: 1.5rem; padding-bottom: 3rem; }

/* === Typografie-Stufen === */
.t-page { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.t-section { font-size: 14px; line-height: 20px; font-weight: 600; }
.t-meta { font-size: 13px; line-height: 18px; color: var(--text-2); }
.t-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.t-kpi { font-size: 24px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }

/* === Top Bar === */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 200;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.top-bar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border);
  height: 24px;
}
.top-bar-logo-img {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}
.top-bar-brand,
.top-bar-title { font-weight: 600; font-size: 0.9375rem; color: var(--gray-900); }
.burger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--gray-600);
  cursor: pointer;
}
.burger-btn:hover { background: var(--gray-100); color: var(--gray-900); }

/* === User Menu === */
.top-bar-right { display: flex; align-items: center; gap: 0.25rem; }
.user-menu { position: relative; }
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 32px;
  padding: 0 0.375rem 0 0.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  color: var(--gray-900);
  font-size: 0.8125rem;
  font-weight: 500;
}
.user-menu-btn:hover { background: var(--gray-100); }
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dfe6f3;
  color: #1f3f7a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-name { font-weight: 500; color: var(--gray-900); }
.user-dots { color: var(--gray-500); flex-shrink: 0; }
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  min-width: 200px;
  z-index: 300;
  overflow: hidden;
  padding: 4px;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 32px;
  padding: 0 0.625rem;
  border: none;
  border-radius: 4px;
  background: none;
  text-decoration: none;
  color: var(--gray-900);
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}
.user-dropdown-item:hover { background: var(--gray-100); }
.user-dropdown-item svg { color: var(--gray-600); }
.user-dropdown-group { padding: 4px 0; }
.user-dropdown-label {
  display: block;
  padding: 0.25rem 0.625rem 0.375rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.user-dropdown-item--lang .lang-code {
  display: inline-block;
  min-width: 1.75rem;
  font-weight: 600;
  color: var(--gray-600);
}
.user-dropdown-item--lang.is-active { color: var(--primary); font-weight: 500; }
.user-dropdown-item--lang .lang-check { margin-left: auto; color: var(--primary); }
.user-dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* === Flash Messages === */
.flash-container {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 1.25rem;
  width: min(420px, calc(100vw - 2.5rem));
  z-index: 190;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.flash-container .alert { box-shadow: var(--shadow-pop); }

/* === Footer === */
.footer {
  background: transparent;
  color: var(--gray-500);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.75rem;
  margin-top: auto;
}

/* === Page Header ===
   Links: Breadcrumb, Titel, Untertitel. Rechts: Aktionen in der Reihenfolge
   [Mehr-Menü] [Sekundär …] [Primär]. Genau ein Primär-Button je Seite. */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.page-header > div:first-child { display: flex; flex-direction: column; gap: 0.25rem; }
.page-header h1 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  margin: 0;
}
.page-header-actions,
.page-header > .actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
  flex-shrink: 0;
}
.page-subtitle,
.dash-subtitle,
.project-meta-sub {
  font-size: 13px;
  line-height: 18px;
  color: var(--text-2);
  margin: 0;
}
.page-intro { font-size: 14px; color: var(--text-2); margin-bottom: 1.25rem; max-width: 72ch; }
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-3);
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-300); }
.back-link { display: none; }

/* === Buttons ===
   Primär  – die eine Hauptaktion, ganz rechts.
   Sekundär – gleichwertige Nebenaktionen (Bearbeiten, Exportieren, Abbrechen).
   Tertiär – leise Aktionen im Kontext (Zurück, Zeilenmenüs, Icon-Buttons).
   Destruktiv – rot gefüllt nur im Bestätigungsdialog, sonst als
   .btn-secondary.btn-destructive / .btn-tertiary.btn-destructive.
   Alte Klassen (.btn-outline, .btn-ghost, .btn-link, .btn-danger-outline,
   .btn-danger-sm) bleiben als Aliase gültig. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-primary:active { background: var(--primary-active); border-color: var(--primary-active); }

.btn-secondary,
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--gray-900); }
.btn-secondary:hover,
.btn-outline:hover { background: var(--surface-2); border-color: #b4b9c1; color: var(--gray-900); }
.btn-secondary:active,
.btn-outline:active { background: var(--gray-100); }

.btn-tertiary,
.btn-ghost,
.btn-link { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-tertiary:hover,
.btn-ghost:hover,
.btn-link:hover { background: #eceef1; color: var(--gray-900); }
.btn-tertiary:active,
.btn-ghost:active { background: var(--gray-200); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); color: #fff; }
.btn-secondary.btn-destructive,
.btn-outline.btn-destructive,
.btn-danger-outline { background: var(--surface); border-color: var(--border-strong); color: var(--danger); }
.btn-secondary.btn-destructive:hover,
.btn-outline.btn-destructive:hover,
.btn-danger-outline:hover { background: var(--danger-light); border-color: #e3a6a6; color: var(--danger); }
.btn-tertiary.btn-destructive,
.btn-danger-sm { background: transparent; border-color: transparent; color: var(--danger); height: 32px; padding: 0 12px; font-size: 13px; }
.btn-tertiary.btn-destructive:hover,
.btn-danger-sm:hover { background: var(--danger-light); color: var(--danger); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-icon { width: 32px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-block { display: flex; width: 100%; }
.btn-group { display: inline-flex; align-items: center; gap: 0.5rem; }

/* === Cards === */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: none;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.card-header h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.card-body { margin-bottom: 0.75rem; }
.card-actions { display: flex; gap: 0.5rem; align-items: center; }
.card-header-right { display: flex; align-items: center; gap: 0.5rem; }
.card-section-title {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.875rem;
}

/* === Kebab Menu === */
.kebab-menu { position: relative; }
.kebab-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--gray-600);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kebab-btn:hover { background: #eceef1; color: var(--gray-900); }
.kebab-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  min-width: 180px;
  z-index: 50;
  padding: 4px;
  margin-top: 4px;
}
.kebab-menu.open .kebab-dropdown { display: block; }
.kebab-dropdown a,
.kebab-dropdown button.kebab-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 30px;
  padding: 0 0.625rem;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
  color: var(--gray-900);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.kebab-dropdown a:hover { background: var(--gray-100); }
.export-dropdown { min-width: 200px; }
.kebab-dropdown button.kebab-danger { color: var(--danger); }
.kebab-dropdown button.kebab-danger:hover { background: var(--danger-light); }

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-badge);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  background: #eef0f3;
  color: var(--text-2);
  border: 1px solid transparent;
}
.badge-method,
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-outline { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* === Project Grid === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  transition: box-shadow 0.2s, transform 0.2s;
}
.project-card .card-header,
.project-card .card-body,
.project-card .card-actions { padding: 0 1.25rem; }
.project-card .card-header { padding-top: 1rem; }
.project-card .card-body { flex: 1; }
.project-card .card-actions { padding-bottom: 1.25rem; }

.project-card-cover { width: 100%; height: 180px; overflow: hidden; }
.project-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-card-placeholder {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-300);
}

.cover-preview {
  margin-top: 0.5rem;
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  display: block;
}

.cover-current { margin-bottom: 0.75rem; }
.cover-remove-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--danger);
  cursor: pointer;
}

/* === Project Card Score === */
.project-score-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
}
.score-class-mini {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.project-score-info {
  display: flex;
  flex-direction: column;
  min-width: 3.5rem;
}
.project-score-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}
.project-score-label {
  font-size: 0.7rem;
  color: var(--gray-500);
}
.project-score-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}
.project-score-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s;
}

.project-meta { font-size: 0.875rem; color: var(--gray-500); margin-bottom: 0.25rem; }
.project-meta .label { font-weight: 600; color: var(--gray-700); }
.project-meta-facts {
  font-size: .8rem;
  color: var(--gray-600);
  background: var(--gray-50);
  padding: .3rem .6rem;
  border-radius: 4px;
  margin-top: .35rem;
  font-variant-numeric: tabular-nums;
}

/* Project-Detailseite: Gebäudedaten als Liste */
.project-fact-list {
  list-style: none;
  padding: 0;
  margin: .5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  font-size: .85rem;
  color: var(--gray-600);
}
.project-fact-list .project-fact-label {
  color: var(--gray-500);
  font-weight: 500;
  margin-right: .2rem;
}

/* Form: gruppierter Feldblock */
.form-fieldset {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
}
.form-fieldset legend {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 0 .5rem;
}

/* === Empty State === */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state h2 { margin-bottom: 0.5rem; color: var(--gray-500); }
.empty-state p { margin-bottom: 1.5rem; color: var(--gray-500); }

/* === Forms === */
.form { max-width: 600px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.875rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--gray-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.inline-form { display: inline; }

/* === Alerts === */
.alert {
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 4px solid transparent;
}
.alert-success {
  background: #f0fdf4;
  color: #166534;
  border-left-color: #16a34a;
}
.alert-error {
  background: #fff1f2;
  color: #9f1239;
  border-left-color: #e11d48;
}

/* === Assessment Domains (no sidebar) === */
.assessment-domains {
  max-width: 100%;
}
.assessment-domains .domain-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
}
.assessment-domains .domain-section:last-of-type {
  border-bottom: none;
}

/* === App Layout (Global Sidebar + Content) === */
.app-layout {
  display: flex;
  flex: 1;
  padding-top: var(--topbar-h);
  position: relative;
}

/* === Sidebar Logo (nicht mehr genutzt, Logo sitzt in der Topbar) === */
.sidebar-logo { display: none; }

/* === Main Sidebar (hell, 240 px) === */
.main-sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 0;
  overflow: visible;
  z-index: 110;
  transition: width 0.2s ease;
  display: flex;
  flex-direction: column;
}
.main-sidebar > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.app-layout.sidebar-collapsed .main-sidebar { width: var(--sidebar-w-collapsed); }

.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.2s ease;
}
.app-layout.sidebar-collapsed .main-content { margin-left: var(--sidebar-w-collapsed); }

/* === Sidebar Toggle === */
.sidebar-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.sidebar-toggle-btn:hover { color: var(--gray-900); background: var(--sidebar-bg-hover); }
.app-layout.sidebar-collapsed .sidebar-toggle-btn { left: 14px; right: auto; }

/* === Navigation Menu === */
.main-sidebar nav { padding-top: 44px; }
.nav-menu { list-style: none; padding: 0 8px 1rem; }
.nav-item { margin-bottom: 1px; }

/* Oberste Ebene (mit Icon) */
.nav-item-flat > .nav-link {
  display: flex;
  align-items: center;
  gap: 0;
  height: 32px;
  padding: 0 8px 0 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item-flat > .nav-link:hover { background: var(--sidebar-bg-hover); color: var(--gray-900); }
.nav-item-flat.active > .nav-link { color: var(--sidebar-text-active); background: var(--sidebar-bg-active); }
.nav-item-flat.active > .nav-link::before { content: none; }
.nav-item-flat.active > .nav-link .nav-icon { color: var(--sidebar-text-active); }

/* Icon-Box mit fester Breite, damit Icons auch eingeklappt fluchten */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gray-600);
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-item-flat > .nav-link:hover .nav-icon { color: var(--gray-900); }

.nav-text { transition: opacity 0.15s ease, width 0.2s ease; overflow: hidden; }
.app-layout.sidebar-collapsed .nav-text { opacity: 0; width: 0; }

.nav-item-flat > .nav-link > .nav-chevron { margin-left: auto; }
.app-layout.sidebar-collapsed .nav-item-flat > .nav-link > .nav-chevron { opacity: 0; width: 0; }

/* Verschachtelte Einträge */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--sidebar-text-muted);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-link:hover { background: var(--sidebar-bg-hover); color: var(--gray-900); }

.nav-chevron {
  font-size: 10px;
  color: var(--gray-400);
  transition: transform 0.15s;
  flex-shrink: 0;
  display: inline-block;
  width: 0.8em;
  text-align: center;
}
.nav-item.expanded > .nav-link > .nav-chevron { transform: rotate(90deg); }

.nav-children { list-style: none; display: none; padding-left: 20px; margin-top: 1px; }
.nav-item-flat > .nav-children { padding-left: 32px; }
.nav-item.expanded > .nav-children { display: block; }
.app-layout.sidebar-collapsed .nav-children { display: none !important; }

.nav-leaf .nav-link { font-weight: 400; font-size: 13px; color: var(--sidebar-text-muted); padding-left: 8px; }
.nav-leaf .nav-link:hover { color: var(--gray-900); }
.nav-leaf.active > .nav-link,
.nav-leaf .nav-link.is-active { background: var(--sidebar-bg-active); color: var(--sidebar-text-active); font-weight: 500; }
.nav-item-tree:not(.nav-item-flat) > .nav-link { font-weight: 500; color: var(--sidebar-text); }

.nav-placeholder { font-style: italic; color: var(--gray-400) !important; cursor: default; }
.nav-placeholder:hover { background: transparent !important; }

.app-layout.sidebar-collapsed .nav-item-flat > .nav-link { padding: 0; }

/* === Domain Section === */
.domain-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.domain-header h2 { font-size: 1.2rem; }

.triage-select {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

/* === Services Table === */
.services-table-wrap { overflow-x: auto; }
.services-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.services-table th {
  text-align: left;
  padding: 0.55rem 0.6rem;
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  white-space: nowrap;
}
.services-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.services-table tr:hover { background: #f8f9ff; }

.col-code { width: 80px; font-family: monospace; font-weight: 600; }
.col-name { min-width: 150px; }
.col-assess { min-width: 200px; }
.col-level { width: 50px; text-align: center; }
.col-max { width: 40px; text-align: center; color: var(--gray-500); }

.level-select {
  width: auto;
  min-width: 200px;
  max-width: 400px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 0.8rem;
}

.level-number {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-weight: 600;
  color: var(--gray-700);
}

/* === Comment Row === */
.comment-row td { padding-top: 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--gray-200); }
.comment-row:hover { background: transparent; }
.comment-input {
  width: 100%;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--gray-500);
  background: var(--gray-50);
  transition: border-color 0.15s;
}
.comment-input:focus {
  outline: none;
  border-color: var(--primary);
  color: var(--gray-900);
  background: #fff;
}
.comment-input::placeholder { color: var(--gray-300); }

/* === Service Row Highlight === */
.service-row.highlight {
  animation: row-highlight 1.5s ease;
}
@keyframes row-highlight {
  0%, 30% { background: rgba(37, 99, 235, 0.12); }
  100% { background: transparent; }
}

/* === Results === */
.assessor-info-bar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}
.assessor-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.assessor-info-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0.1rem 0;
}
.label-sub {
  font-size: 0.78rem;
  color: var(--gray-400);
  font-weight: 400;
}
.assessor-info-label { color: var(--gray-500); }
.assessor-info-sep { color: var(--border); }
.assessor-projects-list { list-style: none; padding: 0; margin: 0; }
.assessor-projects-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.assessor-projects-list li:last-child { border-bottom: none; }
.assessor-link { font-weight: 500; }

/* Assessor view mode */
.assessor-view { padding: 0; overflow: hidden; }
.assessor-view-row {
  display: flex;
  align-items: baseline;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.assessor-view-row:last-child { border-bottom: none; }
.assessor-view-label {
  min-width: 160px;
  color: var(--gray-500);
  font-size: 0.85rem;
}
.assessor-view-value { font-weight: 500; }

/* Kebab menu */
.kebab-menu { position: relative; }
.kebab-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  padding: 0;
}
.kebab-btn span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text);
}
.kebab-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 150px;
  z-index: 100;
  overflow: hidden;
}
.kebab-dropdown.open { display: block; }
.kebab-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.kebab-item:hover { background: var(--bg); }
.kebab-item-danger { color: var(--danger); }
.kebab-item-danger:hover { background: #fff0f0; }

.results-overview { margin-bottom: 2rem; }

.score-card-main {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
}
.score-class {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.sri-class-a { background: #15803d; }
.sri-class-b { background: #22c55e; }
.sri-class-c { background: #eab308; }
.sri-class-d { background: #f97316; }
.sri-class-e { background: #ea580c; }
.sri-class-f { background: #dc2626; }
.sri-class-g { background: #991b1b; }

.score-value { font-size: 2rem; font-weight: 700; }
.score-label { color: var(--gray-500); font-size: 0.9rem; }
.score-range { color: var(--primary); font-size: 0.8rem; margin-top: 0.1rem; font-weight: 500; }
.score-desc { color: var(--gray-500); font-size: 0.85rem; margin-top: 0.25rem; }
.score-meta-country { color: var(--gray-400); font-size: 0.78rem; margin-top: 0.4rem; }
.score-building-type { font-size: 0.85rem; color: var(--gray-600, #4b5563); font-weight: 600; margin-bottom: 0.35rem; }
.text-muted { color: var(--gray-400); font-style: italic; }
.badge-condition {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-500);
  margin-left: 0.3rem;
  vertical-align: middle;
}
.score-cell-total { border-left: 2px solid var(--border); font-weight: 600; }
.triage-mandatory { background: rgba(255, 165, 0, 0.05); }
.triage-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.results-grid .card h3 { margin-bottom: 1rem; font-size: 1rem; }

/* === KF Bars === */
.kf-item { margin-bottom: 0.75rem; }
.kf-label { font-size: 0.8rem; font-weight: 500; margin-bottom: 0.25rem; }
.bar-wrap {
  background: var(--gray-100);
  border-radius: 4px;
  height: 24px;
  overflow: hidden;
}
.bar {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  min-width: 2.5rem;
  transition: width 0.4s;
}
.bar-impact { background: var(--success); }
.bar-value { color: #fff; font-size: 0.7rem; font-weight: 600; }

/* === Domain Scores Table === */
.domain-scores-table-wrap { overflow-x: auto; }
.domain-scores-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.domain-scores-table th {
  padding: 0.5rem 0.35rem;
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
}
.domain-scores-table td { padding: 0.4rem 0.35rem; border-bottom: 1px solid var(--gray-100); text-align: center; }
.domain-scores-table td:first-child { text-align: left; font-weight: 500; white-space: nowrap; }

.rotate { writing-mode: vertical-lr; transform: rotate(180deg); font-size: 0.7rem; }

.score-pill {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-500);
}
.score-pill.high { background: #dcfce7; color: #166534; }
.score-pill.mid { background: #fef3c7; color: #92400e; }
.score-pill.low { background: #fef2f2; color: #991b1b; }

/* === Mini Bar === */
.mini-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mini-bar-wrap span { font-size: 0.75rem; color: var(--gray-500); min-width: 2rem; }
.mini-bar {
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
  min-width: 2px;
}

/* === Photo Upload === */
.photo-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-200); }
.photo-section h3 { font-size: 1rem; margin-bottom: 0.75rem; }

.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
  background: #fafbff;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-label {
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
}
.upload-input { display: none; }
.upload-hint { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.25rem; }

/* Info-Tooltip (ⓘ) */
.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  cursor: help;
  color: var(--gray-400);
  vertical-align: middle;
}
.info-tooltip svg { display: block; }
.info-tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800, #1f2937);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  width: 280px;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.info-tooltip .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gray-800, #1f2937);
}
.info-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-100);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.gallery-item:hover .gallery-delete { opacity: 1; }
.gallery-delete:hover { background: var(--danger); }

.domain-img-count {
  font-size: 0.65rem;
  color: var(--gray-500);
  margin-left: 0.15rem;
}
.domain-link.active .domain-img-count { color: rgba(255,255,255,0.8); }

/* === Gallery Captions === */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 0.5rem 0.35rem 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.gallery-caption-name {
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-caption-desc {
  color: rgba(255,255,255,0.7);
  font-size: 0.6rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Gallery Edit Button === */
.gallery-edit {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.gallery-item:hover .gallery-edit { opacity: 1; }
.gallery-edit:hover { background: var(--primary); }

/* === Results Photo Gallery === */
.results-photo-domain { margin-bottom: 1.25rem; }
.results-photo-domain h4 { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--gray-700); }
.results-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.results-gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-100);
  transition: transform 0.15s;
}
.results-gallery-item:hover { transform: scale(1.03); }
.results-gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.results-gallery-caption {
  padding: 0.35rem 0.5rem;
  background: var(--gray-50);
  font-size: 0.75rem;
  line-height: 1.3;
}
.results-gallery-caption strong { display: block; color: var(--gray-900); }
.results-gallery-caption span { color: var(--gray-500); font-size: 0.7rem; }

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  cursor: default;
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.lightbox-caption {
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  border-radius: 0 0 var(--radius) var(--radius);
  width: 100%;
  text-align: center;
}
.lightbox-caption strong { display: block; font-size: 1rem; margin-bottom: 0.15rem; }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(30,45,90,0.08);
  width: 90vw;
  max-width: 700px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.modal-sm { max-width: 460px; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 1.05rem; margin: 0; font-weight: 700; color: var(--gray-900); }
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--gray-400);
  line-height: 1;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-900); }
.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* === Upload Preview === */
.upload-preview-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.upload-preview-item:last-child { border-bottom: none; }
.upload-preview-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
  background: var(--gray-100);
}
.upload-preview-fields { flex: 1; }
.upload-preview-fields .form-group { margin-bottom: 0.5rem; }
.upload-preview-fields .form-group label { font-size: 0.8rem; margin-bottom: 0.2rem; }
.upload-preview-fields input,
.upload-preview-fields textarea {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
}

/* === Radio Group === */
.radio-group {
  display: flex;
  gap: 1.5rem;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  cursor: pointer;
}

/* === SMSC Placeholder Pages === */
.info-banner {
  background: #e8f4fd;
  border: 1px solid #b3d9f2;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: #1a6fa0;
  margin-bottom: 1.5rem;
}
.smsc-section {
  margin-bottom: 1.5rem;
}
.smsc-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.3rem;
}
.smsc-category {
  padding: 0.5rem 0 0.5rem 1rem;
}
.smsc-category h3 {
  font-size: 0.95rem;
  margin: 0;
}
.category-meta {
  font-size: 0.85rem;
  color: #888;
  margin: 0.2rem 0 0;
}
.score-placeholder {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: #555;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .project-grid { grid-template-columns: 1fr; }
  .main-sidebar { width: 260px; }
  .app-layout.sidebar-collapsed .main-sidebar { width: 0; overflow: hidden; }
  .main-content { margin-left: 0; }
  .app-layout:not(.sidebar-collapsed) .main-content { margin-left: 0; }
  .app-layout.sidebar-collapsed .main-content { margin-left: 0; }
  .user-name { display: none; }
  .results-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .score-card-main { flex-direction: column; text-align: center; }
  .level-select { min-width: 150px; max-width: 250px; }
  .overview-tiles { grid-template-columns: 1fr; }
}

/* Project Overview Tiles */
.project-meta-sub {
  color: var(--text-secondary);
  margin: .25rem 0 0 0;
  font-size: .9rem;
}

.back-link {
  display: inline-block;
  color: var(--text-secondary);
  font-size: .85rem;
  margin-bottom: .4rem;
  text-decoration: none;
}
.back-link:hover { color: var(--primary); }

.overview-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.overview-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  text-decoration: none;
  position: relative;
  transition: box-shadow .15s, border-color .15s;
}

.overview-tile-active {
  color: inherit;
  cursor: pointer;
}
.overview-tile-active:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-color: var(--primary);
}

.overview-tile-inactive {
  opacity: .45;
  cursor: default;
  filter: grayscale(0.4);
}

.overview-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-secondary, #f4f5f7);
  color: var(--primary);
}
.overview-tile-inactive .overview-tile-icon {
  color: var(--text-secondary);
}

.overview-tile-body {
  flex: 1;
}

.overview-tile-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .25rem;
}

.overview-tile-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.overview-tile-badge {
  font-size: .75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary, #f4f5f7);
  padding: .2rem .6rem;
  border-radius: 999px;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ── Grundriss-Verwaltung (Projekt-Edit) ──────────────────────────────────── */

.floorplan-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fp-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.fp-empty {
  color: var(--text-secondary);
  font-size: .9rem;
}

.fp-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 160px;
  background: var(--card-bg);
}

.fp-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.fp-item-info {
  padding: .4rem .6rem;
}

.fp-floor-badge {
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
}

.fp-delete-btn {
  position: absolute;
  top: .3rem;
  right: .3rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.fp-delete-btn:hover {
  background: var(--danger);
}

/* ── Grundriss-Marker (Upload + Edit Modal) ───────────────────────────────── */

.modal-wide {
  max-width: 680px;
  width: 95vw;
}

.fp-marker-group {
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: .5rem;
}

.fp-marker-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.fp-marker-set-label {
  font-size: .85rem;
  color: var(--success, #16a34a);
  font-weight: 500;
}

.label-optional {
  font-size: .8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.fp-inline-viewer {
  margin-top: .75rem;
}

.fp-inline-wrap {
  position: relative;
  display: inline-block;
  cursor: crosshair;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 100%;
}

.fp-inline-img {
  display: block;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  user-select: none;
}

.fp-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.fp-pin::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--danger, #dc2626);
}

.fp-pin::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  background: var(--danger, #dc2626);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* Gallery: Marker-Badge auf Vorschaubild */
.gallery-item {
  position: relative;
}

.gallery-marker-badge {
  position: absolute;
  top: .3rem;
  left: .3rem;
  background: rgba(220, 38, 38, .85);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .35rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: .2rem;
  pointer-events: none;
  z-index: 1;
}

/* ── Hilfs-Klassen ────────────────────────────────────────────────────────── */


/* === Use Cases === */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  grid-auto-rows: 1fr; /* gleiche Zeilenhöhe */
}
.uc-card-wrapper {
  display: flex; /* wrapper füllt grid-cell */
}
.uc-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.uc-card:hover {
  box-shadow: 0 4px 16px rgba(30,45,90,0.10);
  border-color: var(--primary);
}
/* Zone 1: Header-Balken */
.uc-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--sidebar-bg);
  padding: 0.6rem 0.9rem;
  min-height: 2.6rem;
}
.uc-card-id {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  flex-shrink: 0;
}
.uc-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin: 0;
}
/* Zone 2: Tags */
.uc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.6rem 0.9rem;
  min-height: 2.4rem;
  border-bottom: 1px solid var(--border);
}
/* Zone 3: Kurzbeschreibung */
.uc-card-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  padding: 0.7rem 0.9rem;
  line-height: 1.5;
  flex: 1; /* nimmt restlichen Platz → gleiche Kartenhöhe */
  margin: 0;
}
.uc-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--gray-600);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
/* === Use Case Detail Layout === */
.uc-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: flex-start;
}
.uc-detail-content {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.75rem;
}
.uc-media-panel {
  position: sticky;
  top: calc(56px + 1rem);
}
.uc-media-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}
.uc-media-sublabel {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.uc-media-hint {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--gray-400);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}
.uc-media-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.uc-media-video {
  width: 100%;
  display: block;
  border-radius: var(--radius);
}
.uc-media-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.uc-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--gray-400);
  font-size: 0.85rem;
  text-align: center;
}
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: text;
}
.tag-input-wrapper:focus-within {
  border-color: var(--primary);
  outline: 2px solid color-mix(in srgb, var(--primary) 20%, transparent);
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 2px 8px 2px 10px;
  border-radius: 20px;
}
.tag-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.tag-remove:hover { color: #fff; }
.tag-input-wrapper input[type="text"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  min-width: 140px;
  flex: 1;
  padding: 2px 0;
}
.uc-media-current {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .uc-detail-layout { grid-template-columns: 1fr; }
  .uc-media-panel { position: static; }
}

.uc-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.uc-detail-nummer {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  flex-shrink: 0;
}
.uc-detail-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.4rem 0;
}
.uc-detail-section {
  margin-top: 1.25rem;
}
.uc-detail-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin: 0 0 0.5rem 0;
}
.uc-detail-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--gray-700);
  margin: 0;
}

/* === Use Case Kebab === */
.uc-card-wrapper {
  position: relative;
}
.uc-kebab-wrap {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}
.uc-kebab-btn {
  opacity: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  color: rgba(255,255,255,0.8);
  transition: opacity 0.15s, background 0.15s;
}
.uc-kebab-btn:hover {
  background: rgba(255,255,255,0.25) !important;
  color: #fff !important;
}
.uc-card-wrapper:hover .uc-kebab-btn {
  opacity: 1;
}
.uc-kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  z-index: 100;
  overflow: hidden;
}
.uc-kebab-menu .kebab-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--gray-800);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.uc-kebab-menu .kebab-item:hover { background: var(--bg); }
.uc-kebab-menu .kebab-item-danger { color: var(--danger); }
.uc-kebab-menu .kebab-item-danger:hover { background: #fff0f0; }

/* === Use Cases v2 === */
.uc-section { margin-bottom: 2rem; }
.uc-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.uc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.uc-card-id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}
.uc-card-badges { display: flex; gap: 0.3rem; flex-wrap: wrap; }
/* Zeithorizont */
.uc-badge-zeit-kurz   { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.uc-badge-zeit-mittel { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.uc-badge-zeit-lang   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* Aufwand */
.uc-badge-kompl-1 { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.uc-badge-kompl-2 { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.uc-badge-kompl-3 { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.uc-badge-kompl-4 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.uc-badge-kompl-5 { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.uc-badge-kompl-empty {
  background: #f9fafb; color: #6b7280; border-color: #e5e7eb;
  font-style: italic;
}

/* UC-Settings: Komplexitäts-Auswahl (5 Buttons + Reset) */
.uc-kompl-hint { font-weight: 400; color: var(--gray-500); font-size: .78rem; }
.uc-kompl-buttons {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  margin-top: .25rem;
}
.uc-kompl-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--gray-300);
  background: #fff;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.uc-kompl-btn:hover { border-color: var(--primary); color: var(--primary); }
.uc-kompl-btn--on {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.uc-kompl-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--gray-400);
  padding: 0 .35rem;
}
.uc-kompl-clear:hover { color: #dc2626; }

/* Block 3: UCs ohne gesetzte Komplexität */
.b3-uc--no-kompl .b3-uc-name { color: var(--gray-500); }
.b3-no-kompl-link {
  font-size: .72rem;
  color: #b45309;
  text-decoration: none;
  font-weight: 500;
  margin-left: auto;
  background: #fffbeb;
  padding: .2rem .55rem;
  border-radius: 4px;
  border: 1px solid #fde68a;
}
.b3-no-kompl-link:hover { background: #fef3c7; }

.b3-score-sub {
  font-weight: 400;
  font-size: .65rem;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: 0;
}
.uc-stakeholder {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.uc-stakeholder-label {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-right: 0.4rem;
}

/* Detail */
.uc-detail-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.uc-hinweis {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 1.25rem;
}
.uc-kurzform {
  font-size: 1.05rem;
  color: var(--gray-800);
  font-style: italic;
}
.uc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.uc-detail-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.uc-detail-block {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
}
.uc-block-problem { border-left: 3px solid #f87171; }
.uc-block-loesung { border-left: 3px solid #34d399; }
.uc-block-challenge { border-left: 3px solid #fbbf24; }
.uc-block-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin: 0 0 0.5rem 0;
}
.uc-journey-section {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.uc-journey-text { font-style: italic; color: var(--gray-700); }
@media (max-width: 700px) {
  .uc-detail-grid, .uc-detail-grid-3 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   Workshop – Ausgangslage
═══════════════════════════════════════════════════════════════ */

/* Card section title */
.card-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* Ausgangslage grid (5 Abschnitte) */
.al-card { padding: 1.25rem 1.5rem 1rem; }
.al-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem 1.5rem;
}

.al-section {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.al-section-header {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--gray-200);
}

.al-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  min-height: 20px;
}
.al-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .3rem .45rem .3rem .6rem;
  font-size: .85rem;
}
.al-item-text { flex: 1; }
.al-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 .15rem;
  border-radius: 3px;
}
.al-remove:hover { color: var(--danger); background: var(--gray-100); }

.al-add-row {
  display: flex;
  gap: .4rem;
}
.al-add-input {
  flex: 1;
  padding: .3rem .55rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: .82rem;
  background: var(--bg);
  color: var(--text);
}
.al-add-input:focus { outline: none; border-color: var(--primary); }
.al-add-btn {
  padding: .3rem .65rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}
.al-add-btn:hover { background: var(--primary-dark); }

.al-hint {
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: .75rem;
}

/* Zielfeld-Chips */
.zielfeld-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.zielfeld-chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--gray-300);
  background: var(--bg);
  color: var(--gray-500);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.zielfeld-chip input { display: none; }
.zielfeld-chip:hover { border-color: var(--primary); color: var(--primary); }
.zielfeld-chip--on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Reifegrad-Tabelle */
.reifegrad-scroll { overflow-x: auto; }
.reifegrad-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 400px;
  font-size: .85rem;
}
.reifegrad-table th,
.reifegrad-table td {
  padding: .6rem .85rem;
  border: 1px solid var(--gray-200);
  text-align: center;
  vertical-align: middle;
}
.rg-dim-col { width: 180px; text-align: left !important; }
.rg-ls-col { min-width: 130px; font-weight: 600; background: var(--gray-50); }
.rg-dim-label { text-align: left; font-weight: 500; color: var(--text); }

/* Reifegrad-Dimension: Tooltip beim Hover über das Label */
.rg-dim-name {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.rg-dim-name--has-info { cursor: help; }
.rg-dim-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: .65rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  transition: all .12s;
}
.rg-dim-name--has-info:hover .rg-dim-info {
  background: var(--primary);
  color: #fff;
}
/* Floating-Tooltip wird per JS in <body> erzeugt — entgeht damit dem
   overflow:auto-Clipping der reifegrad-scroll-Box. */
.rg-tooltip-floating {
  position: fixed;
  background: #1a2540;
  color: #fff;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.45;
  padding: .55rem .7rem;
  border-radius: 6px;
  width: 280px;
  max-width: calc(100vw - 24px);
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .12s ease, transform .12s ease;
}
.rg-tooltip-floating--show {
  opacity: 1;
  transform: translateY(0);
}
.rg-tooltip-floating::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -6px;
  border: 6px solid transparent;
  border-bottom-color: #1a2540;
  border-top: 0;
}

/* Ampel */
.ampel {
  display: flex;
  gap: .35rem;
  justify-content: center;
  align-items: center;
}
.ampel-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .25;
  transition: opacity .15s, transform .1s;
  flex-shrink: 0;
}
.ampel-dot:hover { opacity: .6; transform: scale(1.15); }
.ampel-dot.on { opacity: 1; }
.ampel-dot.gruen { background: #16a34a; border-color: #14532d; }
.ampel-dot.gelb  { background: #f59e0b; border-color: #92400e; }
.ampel-dot.rot   { background: #dc2626; border-color: #7f1d1d; }

/* ═══════════════════════════════════════════════════════════════
   Workshop – Block 2 Use-Case-Universum
═══════════════════════════════════════════════════════════════ */

.b2-counter {
  font-size: .82rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: .25rem .65rem;
  border-radius: 999px;
  align-self: center;
}

/* Filter-Bar */
.b2-filter-card { padding: .85rem 1.25rem; }
.b2-filter-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .5rem;
}
.b2-filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.b2-filter-chip {
  padding: .28rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--gray-300);
  background: var(--bg);
  color: var(--gray-600);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .14s;
}
.b2-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.b2-filter-chip--on { background: var(--primary); border-color: var(--primary); color: #fff; }
.b2-filter-clear {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: .78rem;
  cursor: pointer;
  text-decoration: underline;
  padding: .2rem .3rem;
}
.b2-filter-clear:hover { color: var(--danger); }

/* Kategorie-Block */
.b2-kategorie-block { margin-bottom: 1.5rem; }
.b2-kategorie-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .6rem;
  padding-left: .1rem;
}

/* UC-Karten Grid */
.b2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
}

.b2-card {
  background: var(--surface);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: .75rem .9rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: border-color .15s, opacity .2s, box-shadow .15s;
  position: relative;
}
.b2-card:hover { border-color: var(--gray-300); box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Highlight & Dim states */
.b2-card--highlight {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-light);
}
.b2-card--dim { opacity: .35; }
.b2-card--off { opacity: .35; background: var(--gray-50); }

/* Card Header */
.b2-card-head {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.b2-card-id {
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: .04em;
}
.b2-toggle-btn {
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--gray-300);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--success);
  transition: all .14s;
  flex-shrink: 0;
}
.b2-toggle-btn:hover { border-color: var(--danger); color: var(--danger); }
.b2-toggle--off { border-color: var(--gray-300); color: var(--gray-400); }
.b2-toggle--off:hover { border-color: var(--success); color: var(--success); }

/* Card Body */
.b2-card-name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.b2-card-desc {
  font-size: .76rem;
  color: var(--gray-500);
  line-height: 1.4;
}
.b2-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .1rem;
}
.b2-tag {
  font-size: .68rem;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  transition: all .12s;
}
.b2-tag--match {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(67,97,238,.25);
  font-weight: 600;
}
.b2-card-name {
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
}
.b2-card-name:hover { color: var(--primary); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   Workshop – UC-Detail
═══════════════════════════════════════════════════════════════ */

.wud-title-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  flex: 1;
}
.wud-uc-id {
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: .04em;
}

/* Page-Header der UC-Detail-Seite: rechter Padding, damit der fixed
   Countdown-Card oben rechts (~110px breit + Margin) nicht den
   Save-Button oder die Nav-Buttons überlagert. */
.wud-page-header {
  padding-right: 10rem;
}
@media (max-width: 720px) {
  /* Auf schmalen Bildschirmen darf der Countdown den Header überdecken;
     die Buttons springen sowieso in eine zweite Zeile durch flex-wrap. */
  .wud-page-header { padding-right: 0; }
}

/* Save-Status + Save-Button schweben dank margin-left:auto nach rechts
   (innerhalb der wud-title-row, vor dem rechten padding). */
.wud-save-status-inline { margin-left: auto; }

/* Navigations-Buttons (Vorheriger / Nächster Use Case): einheitlicher
   Stil mit btn-outline btn-sm, Saving-Feedback. */
.wud-nav-btn--saving {
  opacity: .65;
  pointer-events: none;
}
.wud-nav-btn--saving::before {
  content: '⏳ ';
}

/* „Nicht relevant"-Toggle in der UC-Detail-Title-Row ──────── */
.wud-relevant-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-left: .25rem;
  cursor: pointer;
  user-select: none;
  font-size: .82rem;
  color: var(--gray-700);
}
.wud-relevant-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.wud-relevant-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--gray-300);
  border-radius: 999px;
  position: relative;
  transition: background .15s;
  flex-shrink: 0;
}
.wud-relevant-thumb {
  display: block;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left .15s;
}
.wud-relevant-toggle input:checked ~ .wud-relevant-track {
  background: var(--danger);
}
.wud-relevant-toggle input:checked ~ .wud-relevant-track .wud-relevant-thumb {
  left: 18px;
}
.wud-relevant-toggle input:checked ~ .wud-relevant-label {
  color: var(--danger);
  font-weight: 600;
}
.wud-relevant-toggle:hover .wud-relevant-track { filter: brightness(0.95); }
.wud-relevant-toggle input:disabled ~ * { opacity: .5; cursor: wait; }

/* Banner unter dem Header, wenn UC als „nicht relevant" markiert ist */
.wud-deaktiviert-banner {
  margin: 0 0 1rem;
  padding: .75rem 1.1rem;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  color: #92400e;
  font-size: .88rem;
  line-height: 1.45;
}
/* Tags-Bar */
.wud-tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1rem;
}
.wud-tag {
  font-size: .75rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
}
.wud-tag--match {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(67,97,238,.25);
  font-weight: 600;
}

/* Two-col layout */
.wud-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .wud-layout { grid-template-columns: 1fr; }
}

/* Main content */
.wud-kurzform {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  font-style: italic;
  line-height: 1.5;
}

.wud-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1.25rem;
  margin-bottom: 1.25rem;
}
.wud-block--full { grid-column: 1 / -1; }
.wud-block--journey {
  border-left: 3px solid var(--primary);
  background: var(--primary-light);
}
.wud-block--journey .wud-block-label { color: var(--primary); }

.wud-block {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: .7rem .9rem;
}
.wud-block-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .3rem;
}
.wud-block-text {
  font-size: .85rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-line;
}

/* Media */
.wud-media {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
.wud-media-item { flex: 1; min-width: 220px; }
.wud-video, .wud-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  max-height: 280px;
  object-fit: contain;
  background: var(--gray-50);
}
.wud-panel--challenges { margin-top: 1rem; }

/* Aside */
.wud-aside { display: flex; flex-direction: column; gap: 1rem; }

.wud-score-card {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: .9rem 1rem;
}
.wud-score-values { display: flex; gap: 1rem; margin: .5rem 0; }
.wud-score-item { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.wud-score-label { font-size: .68rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .04em; }
.wud-score-val { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.wud-quadrant-badge {
  display: inline-block;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  margin-top: .3rem;
}

.wud-panel {
  background: var(--surface);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: .9rem 1rem;
}

/* Relevanz */
.wud-relevanz { display: flex; flex-direction: column; gap: .75rem; }
.wud-ls-group { }
.wud-ls-name {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .3rem;
}
.wud-rel-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .83rem;
  color: var(--text);
  cursor: pointer;
  padding: .15rem 0;
}
.wud-rel-item input { cursor: pointer; }
.wud-rel-empty { font-size: .78rem; color: var(--gray-400); font-style: italic; }

/* Textareas (Ausgangslage, Challenges) — geteilter Style */
.wud-ausgangslage,
.wud-chal-text {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: .5rem .65rem;
  font-size: .84rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  line-height: 1.5;
}
.wud-ausgangslage:focus,
.wud-chal-text:focus { outline: none; border-color: var(--primary); }

/* ── Projekt-Relevanz: Tabellenform mit zwei Spalten ─────── */
.wud-rel-table { display: flex; flex-direction: column; gap: .9rem; }
.wud-rel-headrow {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  align-items: end;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--gray-200);
}
.wud-rel-headcol { text-align: center; line-height: 1.2; }
.wud-rel-group { display: flex; flex-direction: column; gap: .25rem; }
.wud-rel-row {
  display: grid;
  grid-template-columns: 1fr 110px 110px;
  align-items: center;
  font-size: .85rem;
  padding: .15rem 0;
}
.wud-rel-projname { color: var(--text); }
.wud-rel-cell { display: flex; justify-content: center; }
.wud-rel-cell input { cursor: pointer; width: 16px; height: 16px; }

/* ── Challenges: Buttons + Inline-Panels ─────────────────── */
.wud-chal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .5rem;
}
.wud-chal-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: var(--bg);
  border: 1.5px solid var(--gray-300);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.wud-chal-btn:hover { border-color: var(--primary); color: var(--primary); }
.wud-chal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: background .15s;
}
.wud-chal-btn--filled {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.wud-chal-btn--filled:hover { color: #fff; opacity: .9; }
.wud-chal-btn--filled .wud-chal-dot { background: #fff; }

.wud-chal-panels { display: flex; flex-direction: column; gap: .55rem; }
.wud-chal-panel {
  display: none;
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: var(--gray-50);
  padding: .55rem .7rem .65rem;
}
.wud-chal-panel--open { display: block; }
.wud-chal-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}
.wud-chal-panel-title {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary);
}
.wud-chal-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-400);
  padding: 0 .3rem;
}
.wud-chal-panel-close:hover { color: var(--gray-700); }

/* ═══════════════════════════════════════════════════════════════
   Workshop – Block 3 Priorisierung
═══════════════════════════════════════════════════════════════ */

/* Teilnehmer-Zähler */
.b3-voter-ctrl { display: flex; align-items: center; gap: .4rem; }
.b3-voter-label { font-size: .75rem; color: var(--gray-500); margin-right: .2rem; }
.b3-voter-btn {
  width: 26px; height: 26px;
  border: 1.5px solid var(--gray-300);
  border-radius: 50%;
  background: var(--bg);
  font-size: 1rem; font-weight: 700;
  cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.b3-voter-btn:hover { border-color: var(--primary); color: var(--primary); }
.b3-voter-count { font-size: 1rem; font-weight: 700; min-width: 22px; text-align: center; }

.b3-header-actions { display: flex; align-items: center; gap: 1.5rem; }

/* Two-col layout — Sidebar breiter (war 280px, jetzt 360px) damit die
   UC-Namen ohne ellipsis lesbar sind. Container-Width kommt vom globalen
   .container (1500px). */
.b3-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1100px) { .b3-layout { grid-template-columns: 1fr; } }

/* Längere Texte in der Active-Card auf angenehme Lesebreite begrenzen,
   damit sie auf großen Screens nicht zur Endlos-Zeile werden. */
.b3-uc-detail-kurzform,
.b3-uc-detail-block-text,
.b3-uc-detail-note .b3-uc-detail-block-text { max-width: 90ch; }

/* Active Card */
.b3-active-card { padding: 1.1rem 1.25rem; }
.b3-active-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em;
                   text-transform: uppercase; color: var(--gray-400); margin-bottom: .3rem; }
.b3-active-name { font-size: 1.15rem; font-weight: 700; margin-bottom: .15rem; }
.b3-active-id   { font-size: .75rem; color: var(--gray-400); margin-bottom: .85rem; }

/* UC-Detail-Übersicht in Active-Card */
.b3-uc-details {
  margin: 0 0 1rem 0; padding: .85rem; background: var(--gray-50, #fafbff);
  border: 1px solid var(--gray-200); border-radius: 8px;
}
.b3-uc-detail-top { display: flex; flex-direction: column; gap: .65rem; margin-bottom: .85rem; }
.b3-uc-detail-img { width: 100%; max-height: 320px; object-fit: contain;
                    border-radius: 6px; background: #fff;
                    border: 1px solid var(--gray-200); }
.b3-uc-detail-kurzform { font-size: .92rem; line-height: 1.5; color: var(--text); }
.b3-uc-detail-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem;
                       margin-bottom: .65rem; }
@media (max-width: 700px) { .b3-uc-detail-blocks { grid-template-columns: 1fr; } }
.b3-uc-detail-block { background: #fff; padding: .55rem .7rem; border-radius: 6px;
                      border: 1px solid var(--gray-200); }
.b3-uc-detail-block-label { font-size: .65rem; font-weight: 700; letter-spacing: .06em;
                            text-transform: uppercase; color: var(--gray-500);
                            margin-bottom: .25rem; }
.b3-uc-detail-block-text { font-size: .82rem; line-height: 1.45; color: var(--text); }
.b3-uc-detail-note { background: #fff7e6; padding: .55rem .7rem; border-radius: 6px;
                     border: 1px solid #ffe1a3; margin-bottom: .65rem; }
.b3-uc-detail-note .b3-uc-detail-block-label { color: #b76e00; }
.b3-uc-detail-note .b3-uc-detail-block-text { white-space: pre-wrap; }
.b3-uc-detail-challenges {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--text);
}
.b3-uc-detail-challenges li {
  margin: .15rem 0;
  padding-left: .25rem;
}
.b3-chal-cat {
  font-weight: 700;
  color: #b76e00;
  margin-right: .25rem;
}
.b3-uc-detail-gebaeude-wrap { margin-top: .25rem; }
.b3-uc-detail-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.b3-uc-chip { display: inline-block; padding: .2rem .55rem; background: #fff;
              border: 1px solid var(--gray-300); border-radius: 999px;
              font-size: .72rem; color: var(--text); }

/* Progress */
.b3-progress-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.b3-progress-bar-wrap {
  flex: 1; height: 8px; background: var(--gray-200); border-radius: 999px; overflow: hidden;
}
.b3-progress-bar { height: 100%; background: var(--primary); border-radius: 999px;
                   transition: width .4s; width: 0; }
.b3-progress-label { font-size: .8rem; font-weight: 600; color: var(--gray-500);
                     white-space: nowrap; }

/* Voter-Liste */
.b3-voters-list { margin-bottom: .85rem; }
.b3-voters-label { font-size: .7rem; color: var(--gray-400); margin-bottom: .4rem;
                   text-transform: uppercase; letter-spacing: .05em; }
.b3-voters-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.b3-voter-chip { display: inline-flex; align-items: center; gap: .25rem;
                 padding: .25rem .5rem; background: var(--gray-100);
                 border-radius: 6px; font-size: .75rem; color: var(--text); }
.b3-voter-chip::before { content: '✓'; color: var(--success); font-size: .65rem; }

.b3-ctrl-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-bottom: .75rem; }

/* Result */
.b3-result { margin-top: .5rem; border-top: 1px solid var(--gray-200); padding-top: .85rem; }
.b3-result-scores { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
                    margin-bottom: .65rem; }
.b3-score-item { display: flex; flex-direction: column; gap: .1rem; }
.b3-score-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
                  color: var(--gray-400); }
.b3-score-val { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1; }

.b3-quadrant-badge {
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
  background: var(--primary-light); color: var(--primary);
}
.b3-q--quick-win    { background: #dcfce7; color: #166534; }
.b3-q--strategischer-bet { background: #dbeafe; color: #1e40af; }
.b3-q--nice-to-have { background: #f0f4ff; color: var(--gray-500); }
.b3-q--deprioritize { background: #fee2e2; color: #991b1b; }

.b3-votes-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.b3-vote-chip {
  padding: .2rem .55rem;
  border-radius: 6px;
  font-size: .78rem; font-weight: 500;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--text);
}
.b3-vote-chip--outlier {
  background: #fef3c7; border-color: #f59e0b; color: #92400e; font-weight: 700;
}

/* QR Card */
.b3-qr-card { padding: 1rem; text-align: center; }
.b3-qr-img { width: 100%; max-width: 180px; border-radius: 8px; margin-bottom: .6rem; cursor: pointer; transition: transform .15s; }
.b3-qr-img:hover { transform: scale(1.03); }
.b3-vote-url { font-size: .72rem; color: var(--gray-500); word-break: break-all;
               background: var(--gray-50); border-radius: 6px; padding: .35rem .5rem; }

/* QR Modal */
.qr-modal { display: none; position: fixed; inset: 0; z-index: 9999;
            background: rgba(0,0,0,.85); align-items: center; justify-content: center; }
.qr-modal.active { display: flex; }
.qr-modal-close { position: absolute; top: 1rem; right: 1rem;
                 font-size: 2rem; color: #fff; cursor: pointer; opacity: .7; }
.qr-modal-close:hover { opacity: 1; }
.qr-modal-img { max-width: 90vw; max-height: 90vh; border-radius: 12px; }

/* UC-Liste */
.b3-uclist-card { padding: .85rem 1rem; }
.b3-uc-list { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.b3-uc-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .55rem;
  border-radius: 7px;
  border: 1.5px solid var(--gray-200);
  font-size: .82rem;
  background: var(--bg);
  transition: border-color .13s;
}
.b3-uc--done { background: var(--gray-50); opacity: .65; }
.b3-uc--active { border-color: var(--primary) !important; background: var(--primary-light); }
.b3-uc-status { font-size: .75rem; color: var(--gray-400); min-width: 14px; }
.b3-uc--done .b3-uc-status { color: var(--success); }
.b3-uc-name { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b3-uc-id   { font-size: .68rem; color: var(--gray-400); }
.b3-start-btn { padding: .2rem .5rem !important; font-size: .72rem !important; }

/* 2×2 Matrix */
.b3-matrix-card { padding: 1.1rem 1.25rem; }
.b3-matrix-row {
  display: grid;
  grid-template-columns: minmax(280px, 480px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .b3-matrix-row { grid-template-columns: 1fr; }
}
.b3-matrix-wrap { overflow: visible; padding: .25rem; }
.b3-matrix-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 480px);
  grid-template-rows: 1fr auto;
  gap: .5rem;
  justify-content: center;
  align-items: stretch;
}
.b3-matrix {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1;
  grid-column: 2;
  grid-row: 1;
}
.b3-matrix-axis-y {
  grid-column: 1;
  grid-row: 1;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: .03em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: .15rem;
}
.b3-matrix-axis-x {
  grid-column: 2;
  grid-row: 2;
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: .03em;
  white-space: nowrap;
  padding-top: .25rem;
}
.b3-matrix-quadrants {
  position: relative; width: 100%; height: 100%;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  border: 1.5px solid var(--gray-300); border-radius: 8px; overflow: hidden;
}
.b3-mq {
  display: flex; align-items: flex-end; padding: .4rem .5rem;
  position: relative;
}
.b3-mq--qw { background: rgba(220,252,231,.35); border-right: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.b3-mq--sb { background: rgba(219,234,254,.35); border-bottom: 1px solid var(--gray-200); }
.b3-mq--nh { background: rgba(240,244,255,.3); border-right: 1px solid var(--gray-200); }
.b3-mq--dp { background: rgba(254,226,226,.25); }
.b3-mq-label { font-size: .65rem; font-weight: 600; color: var(--gray-400);
               text-transform: uppercase; letter-spacing: .04em; }

.b3-matrix-dot {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
  transform: translate(-50%, -50%);
  cursor: default;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.b3-dot-label { font-size: .55rem; font-weight: 700; color: #fff; white-space: nowrap; }
.b3-mq-dot--quick-win    { background: #16a34a; }
.b3-mq-dot--strategischer-bet { background: #2563eb; }
.b3-mq-dot--nice-to-have { background: var(--gray-400); }
.b3-mq-dot--deprioritize { background: #dc2626; }

/* Live-Dot Animation für aktuell laufenden UC */
.b3-matrix-dot--live {
  animation: b3-pulse-dot 1.5s ease-in-out infinite;
  border-width: 3px;
}
@keyframes b3-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67,97,238,.5); }
  50% { box-shadow: 0 0 0 8px rgba(67,97,238,0); }
}

/* Bewertungs-Tabelle neben der Matrix */
.b3-rank-wrap { overflow-x: auto; }
.b3-rank {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}
.b3-rank thead th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .35rem .5rem;
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
}
.b3-rank tbody td {
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.b3-rank-row:last-child td { border-bottom: none; }
.b3-rank-row--live { background: rgba(67,97,238,.06); }
.b3-rank-id {
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.b3-rank-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.b3-rank-name {
  color: var(--text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b3-rank-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--gray-700);
}
.b3-rank-q {
  font-size: .7rem;
  color: var(--gray-500);
  white-space: nowrap;
}
.b3-rank-row--quick-win .b3-rank-q { color: #16a34a; font-weight: 600; }
.b3-rank-row--strategischer-bet .b3-rank-q { color: #2563eb; font-weight: 600; }
.b3-rank-row--nice-to-have .b3-rank-q { color: var(--gray-500); }
.b3-rank-row--deprioritize .b3-rank-q { color: #dc2626; font-weight: 600; }

.b3-rank-act { width: 28px; }
.b3-rank-del {
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all .12s;
}
.b3-rank-del:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #dc2626;
}

/* Confirm-Modal mit „ja"-Eingabe */
.b3-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.b3-confirm-modal {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.b3-confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}
.b3-confirm-body {
  font-size: .9rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.b3-confirm-hint {
  font-size: .85rem;
  color: var(--text);
  margin-bottom: .5rem;
}
.b3-confirm-input {
  width: 100%;
  padding: .65rem .8rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 1rem;
}
.b3-confirm-input:focus { outline: none; border-color: #dc2626; }
.b3-confirm-btns {
  display: flex;
  gap: .65rem;
  justify-content: flex-end;
}
.b3-confirm-ok {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}
.b3-confirm-ok:disabled {
  background: #fca5a5 !important;
  border-color: #fca5a5 !important;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   Workshop – Block 5 Roadmap & Nächste Schritte
   (Stand 2026-05-07: alte Bestandserfassungs-Scope-UI entfernt)
═══════════════════════════════════════════════════════════════ */

.rm-header-actions { display: flex; align-items: center; gap: .9rem; }

.rm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1100px) { .rm-layout { grid-template-columns: 1fr; } }

.rm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}

.rm-empty {
  border: 1px dashed var(--gray-300);
  border-radius: 10px;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--gray-500);
}
.rm-empty p { margin-bottom: 1rem; font-size: .9rem; }

.rm-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-left: 3px solid var(--gray-300);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: border-left-color .15s, box-shadow .15s;
}
.rm-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.rm-card[data-prio="hoch"]    { border-left-color: #dc2626; }
.rm-card[data-prio="mittel"]  { border-left-color: #f59e0b; }
.rm-card[data-prio="niedrig"] { border-left-color: var(--gray-400); }
.rm-card[data-status="erledigt"] { background: var(--gray-50); opacity: .75; }
.rm-card[data-status="blockiert"] { background: #fef2f2; }

.rm-card-head {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.rm-title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  border: none;
  border-bottom: 1px dashed transparent;
  padding: .2rem 0;
  background: transparent;
  font-family: inherit;
}
.rm-title:focus { outline: none; border-bottom-color: var(--primary); }
.rm-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--gray-300);
  cursor: pointer;
  padding: 0 .25rem;
  flex-shrink: 0;
  transition: color .12s;
}
.rm-remove:hover { color: #dc2626; }

.rm-desc {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--gray-600);
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: .3rem .4rem;
  background: transparent;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  min-height: 2.6em;
}
.rm-desc:focus { outline: none; border-color: var(--gray-300); background: var(--gray-50); }

.rm-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem .85rem;
  margin-top: .15rem;
}
.rm-field {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.rm-field--wide { grid-column: 1 / -1; }
.rm-zeitrahmen-row {
  display: flex;
  gap: .4rem;
}
.rm-zeitrahmen-row .rm-zeitrahmen-q {
  flex: 0 0 auto;
  min-width: 90px;
}
.rm-zeitrahmen-row .rm-zeitrahmen-year {
  flex: 1 1 auto;
  min-width: 0;
}
.rm-field-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.rm-field select,
.rm-field input[type="text"] {
  padding: .35rem .5rem;
  font-size: .85rem;
  border: 1px solid var(--gray-200);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.rm-field select:focus,
.rm-field input[type="text"]:focus { outline: none; border-color: var(--primary); }

.rm-card-foot {
  display: flex;
  gap: .4rem;
  margin-top: .25rem;
  flex-wrap: wrap;
}
.rm-pill {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .22rem .5rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.rm-pill-prio--hoch    { background: #dc2626; color: #fff; }
.rm-pill-prio--mittel  { background: #f59e0b; color: #fff; }
.rm-pill-prio--niedrig { background: var(--gray-200); color: var(--gray-700); }
.rm-pill-prio--        { background: transparent; color: var(--gray-400); border: 1px dashed var(--gray-300); }

.rm-pill-status--geplant   { background: var(--gray-100); color: var(--gray-700); }
.rm-pill-status--in_arbeit { background: #dbeafe; color: #1e40af; }
.rm-pill-status--blockiert { background: #fee2e2; color: #b91c1c; }
.rm-pill-status--erledigt  { background: #dcfce7; color: #166534; }
.rm-pill-status--          { background: transparent; color: var(--gray-400); border: 1px dashed var(--gray-300); }

/* Sidebar UC-Liste (Read-only) */
.rm-aside-card { padding: .85rem 1rem; }
.rm-uc-list { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.rm-uc-item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .4rem .55rem;
  border-radius: 7px;
  border-left: 3px solid var(--gray-300);
  background: var(--gray-50);
  font-size: .8rem;
}
.rm-uc-item--quick-win         { border-color: #16a34a; background: #f0fdf4; }
.rm-uc-item--strategischer-bet { border-color: #2563eb; background: #eff6ff; }
.rm-uc-item--nice-to-have      { border-color: var(--gray-300); }
.rm-uc-item--deprioritize      { border-color: #dc2626; background: #fef2f2; }
.rm-uc-quadrant {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--gray-400);
}
.rm-uc-name  { font-weight: 600; color: var(--text); }
.rm-uc-score { font-size: .72rem; color: var(--gray-400); }

/* ═══════════════════════════════════════════════════════════════
   Workshop – Block 6 Wrap-up
═══════════════════════════════════════════════════════════════ */

/* KPI-Zeile */
.b6-kpi-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.b6-kpi {
  flex: 1; min-width: 100px;
  background: var(--surface);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}
.b6-kpi-val   { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.b6-kpi-label { font-size: .72rem; color: var(--gray-500); text-transform: uppercase;
                letter-spacing: .04em; }

/* Layout */
.b6-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .b6-layout { grid-template-columns: 1fr; } }

.b6-section { padding: 1rem 1.25rem; margin-bottom: 0; }

/* UC Grid */
.b6-uc-grid { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; }
.b6-uc-quadrant-header {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: .3rem .35rem;
  border-radius: 4px; margin-top: .35rem; margin-bottom: .1rem;
  color: var(--gray-500); background: var(--gray-50);
}
.b6-qh--quick-win    { color: #166534; background: #dcfce7; }
.b6-qh--strategischer-bet { color: #1e40af; background: #dbeafe; }
.b6-qh--nice-to-have { color: var(--gray-700); background: var(--gray-100); }
.b6-qh--deprioritize { color: #991b1b; background: #fee2e2; }
.b6-qh-count { font-weight: 500; opacity: .7; margin-left: .35rem; }
.b6-section-sub {
  font-size: .8rem;
  color: var(--gray-500);
  margin: 0 0 .5rem 0;
  line-height: 1.5;
}

/* Zielfeld-Abdeckung im Wrap-Up */
.b6-cov-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.b6-cov-item {
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .5rem .65rem;
  background: #fff;
}
.b6-cov-item--empty {
  background: var(--gray-50);
  border-style: dashed;
}
.b6-cov-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .3rem;
}
.b6-cov-zf {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
}
.b6-cov-count {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}
.b6-cov-item:not(.b6-cov-item--empty) .b6-cov-count { color: var(--primary); }
.b6-cov-percent {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
}
.b6-cov-item:not(.b6-cov-item--empty) .b6-cov-percent { color: var(--primary); }
.b6-cov-count-inline {
  font-size: .72rem;
  font-weight: 500;
  color: var(--gray-500);
}

/* ── Gesamt-Coverage-KPI (oben in der Zielfeld-Abdeckung) ── */
.b6-cov-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
              rgba(67,97,238,0.06) 0%,
              rgba(67,97,238,0.02) 100%);
  border: 1px solid rgba(67,97,238,0.15);
  border-radius: 10px;
  padding: 1rem .5rem;
  margin-bottom: .9rem;
}
.b6-cov-kpi-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.b6-cov-kpi-sub {
  margin-top: .3rem;
  font-size: .82rem;
  color: var(--gray-700);
  font-weight: 600;
  text-align: center;
}
.b6-cov-kpi-sub-dim {
  display: block;
  margin-top: .15rem;
  font-size: .72rem;
  font-weight: 400;
  color: var(--gray-500);
}
.b6-cov-ucs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}
.b6-cov-uc {
  font-size: .68rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  letter-spacing: .03em;
}
.b6-cov-uc--quick-win         { background: #dcfce7; color: #166534; }
.b6-cov-uc--strategischer-bet { background: #dbeafe; color: #1e40af; }
.b6-cov-empty-hint {
  font-size: .75rem;
  color: var(--gray-500);
  font-style: italic;
  margin: 0;
}
.b6-cov-warning {
  margin-top: .85rem;
  padding: .6rem .75rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: .8rem;
  color: #92400e;
  line-height: 1.5;
}

.b6-uc-row {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; padding: .25rem .35rem;
  border-radius: 4px;
  flex-wrap: wrap;
}
.b6-uc-row:hover { background: var(--gray-50); }
.b6-uc-id     { font-size: .7rem; font-weight: 600; color: var(--gray-400); min-width: 52px; }
.b6-uc-name   { flex: 1; font-weight: 500; min-width: 180px; }
.b6-uc-scores { font-size: .72rem; color: var(--gray-400); white-space: nowrap; }

.b6-uc-tags {
  display: inline-flex; flex-wrap: wrap; gap: .2rem;
  align-items: center;
}
.b6-uc-tag {
  font-size: .65rem; font-weight: 600;
  padding: .1rem .4rem;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  white-space: nowrap;
  letter-spacing: .02em;
}
.b6-uc-tag--aktiv {
  background: rgba(67,97,238,0.12);
  color: var(--primary);
}

/* Scope Table */
.b6-scope-table {
  width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .5rem;
}
.b6-scope-table th, .b6-scope-table td {
  padding: .4rem .5rem; border-bottom: 1px solid var(--gray-200);
  text-align: left; vertical-align: top;
}
.b6-scope-table th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
                     color: var(--gray-400); font-weight: 700; }
.b6-scope-kommentar { color: var(--gray-500); font-style: italic; max-width: 200px; }
.b6-prio {
  padding: .12rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 600;
}
.b6-prio--hoch   { background: #fee2e2; color: #991b1b; }
.b6-prio--mittel { background: #fef3c7; color: #92400e; }
.b6-prio--niedrig { background: #dcfce7; color: #166534; }
.b6-prio-empty { color: var(--gray-400); }

/* Pain Points */
.b6-pp-list { list-style: disc; padding-left: 1.2rem; font-size: .83rem;
              color: var(--gray-600); display: flex; flex-direction: column; gap: .3rem; }

/* ════════════════════════════════════════════════════════════════
 * Bewertungen (Evaluations) — Section
 * ════════════════════════════════════════════════════════════════ */

/* Overview-Tabelle Projekt × Methode */
.eval-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.eval-overview-table thead th {
  text-align: left;
  padding: .85rem 1rem;
  background: var(--gray-50, #fafbff);
  border-bottom: 1px solid var(--gray-200);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.eval-overview-table tbody td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.eval-overview-table tbody tr:hover { background: var(--gray-50, #fafbff); }
.eval-col-project { min-width: 220px; }
.eval-col-method { width: 140px; text-align: center; }
.eval-method-head { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.eval-method-name { font-weight: 700; color: var(--gray-900); }
.eval-method-status {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.eval-status--planned   { background: #fef3c7; color: #b45309; }
.eval-status--external  { background: #e0e7ff; color: #3730a3; }
.eval-status--available { background: #dcfce7; color: #166534; }
.eval-status--in_progress { background: #fef3c7; color: #b45309; }
.eval-status--completed   { background: #dcfce7; color: #166534; }
.eval-status--archived    { background: var(--gray-100); color: var(--gray-600); }

.eval-project-link { color: var(--gray-900); font-weight: 600; text-decoration: none; }
.eval-project-link:hover { color: var(--primary); }
.eval-project-sub { font-size: .75rem; color: var(--gray-500); margin-top: .15rem; }

.eval-cell { text-align: center; }
.eval-cell-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: .4rem .65rem;
  border-radius: 8px;
  text-decoration: none;
  background: var(--gray-50, #fafbff);
  border: 1px solid var(--gray-200);
  transition: background .15s, border-color .15s;
}
.eval-cell-link:hover { background: var(--gray-100); border-color: var(--gray-300); }
.eval-cell--completed { background: #f0fdf4; border-color: #bbf7d0; }
.eval-cell--in_progress { background: #fffbeb; border-color: #fde68a; }
.eval-score { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.eval-status-label { font-size: .7rem; color: var(--gray-600); margin-top: .15rem; }
.eval-status-label--progress { color: #b45309; }

.eval-cell-empty {
  width: 36px; height: 36px;
  border: 1.5px dashed var(--gray-300);
  border-radius: 8px;
  background: transparent;
  color: var(--gray-400);
  font-size: 1.3rem;
  font-weight: 300;
  cursor: pointer;
  transition: all .15s;
}
.eval-cell-empty:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--gray-50, #fafbff);
}

/* Methoden-Übersicht (Cards) */
.eval-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.eval-method-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.eval-method-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .85rem;
}
.eval-method-card-title { margin: 0; font-size: 1.05rem; font-weight: 700; }
.eval-method-card-sub { font-size: .75rem; color: var(--gray-500); margin-top: .15rem; }
.eval-method-card-desc { font-size: .9rem; line-height: 1.5; color: var(--gray-700); margin: 0; }
.eval-method-card-foot { font-size: .8rem; color: var(--gray-500); padding-top: .5rem;
                         border-top: 1px solid var(--gray-100); }
.eval-method-foot-hint { font-style: italic; }

/* Detail-View mit Tabs */
.eval-detail-title h1 { margin: 0; }
.eval-detail-sub { font-size: .9rem; color: var(--gray-600); margin-top: .35rem; }
.eval-status-pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}

.eval-tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 1px solid var(--gray-200);
  margin: 1.25rem 0 1rem 0;
}
.eval-tab {
  padding: .65rem 1.1rem;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.eval-tab:hover { color: var(--gray-900); }
.eval-tab--active { color: var(--primary); border-bottom-color: var(--primary); }

.eval-tab-panel { display: none; }
.eval-tab-panel--active { display: block; }

.eval-placeholder { padding: 1.5rem 1.75rem; }
.eval-placeholder h3 { margin: 0 0 .85rem 0; font-size: 1.05rem; }
.eval-placeholder-note { font-size: .9rem; line-height: 1.55; color: var(--gray-700);
                         margin: 0 0 .65rem 0; }
.eval-detail-actions { margin-top: 1.25rem; }


/* ────────────────────────────────────────────────────────────────
 * Ausgangslage und Ziele
 * Klassen-Prefix: .al2-*
 * ──────────────────────────────────────────────────────────────── */

.al2-block {
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.al2-card {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.al2-card:last-child { margin-bottom: 0; }
.al2-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-700, #374151);
  margin-bottom: 0.75rem;
  display: block;
}
.al2-hint-inline {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-500, #6b7280);
  font-size: 0.75rem;
}
.al2-hint {
  font-size: 0.85rem;
  color: var(--gray-600, #4b5563);
  margin: 0.25rem 0 0.75rem 0;
}

/* ── Reifegrad-Tabelle: zweistufiger Header (Liegenschaft × Gebäude) ── */
.reifegrad-table th.rg-ls-col {
  background: var(--gray-100, #f3f4f6);
  font-weight: 700;
  border-bottom: 2px solid var(--gray-300, #d1d5db);
}
.reifegrad-table th.rg-bld-col {
  font-size: .78rem;
  font-weight: 500;
  color: var(--gray-700, #374151);
  background: var(--gray-50, #f9fafb);
  min-width: 110px;
}

/* ── Business-Driver Post-Its ── */
.al2-postits {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1rem 0.5rem 1.25rem;
  align-items: flex-start;
}
.al2-postit {
  position: relative;
  background: #fef3c7;
  padding: 10px;          /* 90px Höhe - 2*10px = 70px Innenraum für Text */
  width: 160px;
  height: 90px;
  box-sizing: border-box;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.12);
  transform: rotate(-1.5deg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s, box-shadow 0.18s;
  border: none;
  font-family: inherit;
}
.al2-postit:nth-child(2n) { transform: rotate(1.2deg); background: #fef9c3; }
.al2-postit:nth-child(3n) { transform: rotate(-0.6deg); background: #fde68a; }
.al2-postit:nth-child(4n) { transform: rotate(0.9deg); background: #fef3c7; }
.al2-postit:nth-child(5n) { transform: rotate(-1.1deg); background: #fcd34d; }
.al2-postit:hover {
  transform: rotate(0) scale(1.04);
  box-shadow: 4px 5px 14px rgba(0,0,0,0.18);
  z-index: 2;
}
.al2-postit-input {
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  overflow: hidden;
  font-size: .92rem;
  font-family: inherit;
  font-weight: 500;
  width: 100%;
  max-height: 70px;
  padding: 0;
  margin: 0;
  text-align: center;
  color: #1f2937;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
}
.al2-postit-input::placeholder { color: rgba(0,0,0,0.3); font-style: italic; }
.al2-postit-remove {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,0.35);
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.al2-postit:hover .al2-postit-remove { opacity: 1; }
.al2-postit-remove:hover { color: #dc2626; }

/* "+ hinzufügen" Post-It */
.al2-postit-add {
  background: transparent !important;
  border: 2px dashed var(--gray-300, #d1d5db) !important;
  box-shadow: none;
  cursor: pointer;
  transform: rotate(0) !important;
  flex-direction: column;
  gap: .15rem;
  color: var(--gray-500, #6b7280);
}
.al2-postit-add:hover {
  border-color: var(--primary, #002965) !important;
  color: var(--primary, #002965);
  box-shadow: none;
  transform: rotate(0) scale(1.04) !important;
}
.al2-postit-add-icon { font-size: 1.5rem; line-height: 1; font-weight: 300; }
.al2-postit-add-label { font-size: .78rem; }

.al2-footer-actions {
  text-align: right;
  margin-top: 1rem;
}

/* Save-Status Indikator im Page-Header */
.al2-header-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.save-status {
  font-size: .78rem;
  color: var(--gray-500, #6b7280);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: color .15s, opacity .2s;
  min-height: 1em;
}
.save-status:empty { display: none; }
.save-status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-300, #d1d5db);
  flex-shrink: 0;
  transition: background .15s;
}
.save-status[data-state="dirty"] {
  color: #b45309;
}
.save-status[data-state="dirty"]::before {
  background: #f59e0b;
}
.save-status[data-state="saving"] {
  color: var(--gray-700, #374151);
}
.save-status[data-state="saving"]::before {
  background: #f59e0b;
  animation: al2-pulse 1s ease-in-out infinite;
}
.save-status[data-state="saved"] {
  color: #16a34a;
}
.save-status[data-state="saved"]::before {
  background: #16a34a;
}
.save-status[data-state="error"] {
  color: #dc2626;
}
.save-status[data-state="error"]::before {
  background: #dc2626;
}
@keyframes al2-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* ────────────────────────────────────────────────────────────────
 * Ausgangslage v3 — Sidebar + Ziele + Pain Points
 * ──────────────────────────────────────────────────────────────── */

.al2-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .al2-layout { grid-template-columns: 1fr; }
}

.al2-sidebar {
  position: sticky;
  top: 5rem;
  align-self: start;
}
.al2-nav {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .25rem 0;
  border-left: 2px solid var(--gray-200, #e5e7eb);
}
.al2-nav-link {
  display: block;
  padding: .45rem .85rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: .85rem;
  color: var(--gray-500, #6b7280);
  text-decoration: none;
  transition: all .12s;
}
.al2-nav-link:hover { color: var(--text, #1a2540); background: var(--gray-50, #f9fafb); }
.al2-nav-link--active {
  color: var(--text, #1a2540);
  font-weight: 600;
  border-left-color: var(--primary, #4361ee);
}
@media (max-width: 900px) {
  .al2-sidebar { position: static; }
  .al2-nav { flex-direction: row; flex-wrap: wrap; border-left: none; border-bottom: 1px solid var(--gray-200, #e5e7eb); }
  .al2-nav-link { margin-left: 0; border-left: none; border-bottom: 2px solid transparent; }
  .al2-nav-link--active { border-left: none; border-bottom-color: var(--primary, #4361ee); }
}

/* ── Ziele des Smart Building Konzepts ─────────────────────── */
.al2-ziele-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 700px) {
  .al2-ziele-grid { grid-template-columns: 1fr; }
}

.al2-ziel-card {
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: 1rem 1rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .12s;
}
.al2-ziel-card:hover { border-color: var(--gray-300, #d1d5db); }

.al2-ziel-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .15rem;
}
.al2-ziel-icon {
  background: transparent;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  width: 30px; height: 30px;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b91c1c;
  padding: 0;
  flex-shrink: 0;
}
.al2-ziel-icon:hover { background: var(--gray-50, #f9fafb); }

.al2-ziel-prio {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .15rem .45rem;
  border-radius: 4px;
  margin-left: auto;
  text-transform: uppercase;
}
.al2-ziel-prio--top { background: #b91c1c; color: #fff; }
.al2-ziel-prio--mid { background: transparent; color: var(--gray-500, #6b7280);
                     border: 1px solid var(--gray-300, #d1d5db); }

.al2-ziel-remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-300, #d1d5db);
  cursor: pointer;
  padding: 0 .25rem;
  margin-left: .25rem;
  flex-shrink: 0;
  transition: color .12s;
}
.al2-ziel-remove:hover { color: #dc2626; }

.al2-ziel-title {
  font-weight: 600;
  font-size: .98rem;
  color: var(--text, #1a2540);
  border: none;
  border-bottom: 1px dashed transparent;
  padding: .15rem 0;
  background: transparent;
  width: 100%;
  font-family: inherit;
}
.al2-ziel-title:focus { outline: none; border-bottom-color: var(--primary, #4361ee); }

.al2-ziel-desc {
  font-size: .82rem;
  line-height: 1.5;
  color: var(--gray-500, #6b7280);
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: .25rem .35rem;
  background: transparent;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  min-height: 2.5em;
}
.al2-ziel-desc:focus { outline: none; border-color: var(--gray-300, #d1d5db); background: var(--gray-50, #f9fafb); }

.al2-ziel-weight {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: .25rem;
  padding-top: .35rem;
}
.al2-ziel-weight-label {
  font-size: .65rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
  font-weight: 600;
  flex-shrink: 0;
}
.al2-ziel-weight-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--gray-200, #e5e7eb);
  border-radius: 2px;
  outline: none;
}
.al2-ziel-weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: #b91c1c;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.al2-ziel-weight-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: #b91c1c;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.al2-ziel-weight-val {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text, #1a2540);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  text-align: right;
  flex-shrink: 0;
}

/* Add-Button (für Ziele und Pain Points) */
.al2-add-btn {
  width: 100%;
  padding: .75rem 1rem;
  background: transparent;
  border: 1px dashed var(--gray-300, #d1d5db);
  border-radius: 6px;
  color: var(--gray-500, #6b7280);
  font-size: .85rem;
  cursor: pointer;
  transition: all .12s;
}
.al2-add-btn:hover {
  border-color: var(--primary, #4361ee);
  color: var(--primary, #4361ee);
  background: var(--gray-50, #f9fafb);
}
.al2-add-btn--dashed { margin-top: .5rem; }

/* Icon-Picker Popover */
.al2-icon-picker {
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  padding: .5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 50;
  width: 220px;
}
.al2-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .25rem;
}
.al2-icon-opt {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 1.1rem;
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #1a2540);
}
.al2-icon-opt:hover { background: var(--gray-50, #f9fafb); border-color: var(--gray-200, #e5e7eb); }

/* ── Pain Points & Opportunities ─────────────────────────── */
.al2-pp-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 0;
}
.al2-pp-item {
  display: grid;
  /* Kategorie-Spalte wächst mit Inhalt (zwischen min und max), Title-Spalte
     füllt den Rest, dann Vote-Counter, dann Remove-X. Das al2-pp-level-Badge
     wurde 2026-05-07 entfernt — siehe Wiki-Sektion. */
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr) auto auto;
  gap: .65rem;
  align-items: start;
  padding: .65rem .8rem;
  background: #fff;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  transition: border-color .12s;
}
.al2-pp-item:hover { border-color: var(--gray-300, #d1d5db); }

.al2-pp-cat {
  /* In Browsern mit field-sizing-Support wächst das Input-Feld mit dem Inhalt;
     Fallback ist die min-width aus dem Grid. */
  field-sizing: content;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--gray-700, #374151);
  text-transform: uppercase;
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 4px;
  padding: .35rem .45rem;
  background: var(--gray-50, #f9fafb);
  min-width: 0;
  max-width: 220px;
  font-family: inherit;
  text-align: center;
  align-self: start;
  margin-top: .1rem;
}
.al2-pp-cat:focus { outline: none; border-color: var(--primary, #4361ee); }

.al2-pp-mid {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.al2-pp-title {
  /* Mehrzeilig: bis zu ~3 Zeilen, danach scrollt die Textarea innen. */
  font-size: .9rem;
  font-weight: 500;
  color: var(--text, #1a2540);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  width: 100%;
  font-family: inherit;
  padding: .25rem .4rem;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  max-height: 4.4em;  /* ~3 Zeilen + etwas Reserve */
  min-height: 1.35em;
}
.al2-pp-title:focus { outline: none; border-color: var(--gray-200, #e5e7eb); background: var(--gray-50, #f9fafb); }
.al2-pp-quelle {
  font-size: .72rem;
  color: var(--gray-500, #6b7280);
  font-style: italic;
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  padding: 0;
}
.al2-pp-quelle:focus { outline: none; color: var(--gray-700, #374151); }

.al2-pp-vote {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  flex-shrink: 0;
}
.al2-pp-vote-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  color: var(--gray-500, #6b7280);
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all .1s;
}
.al2-pp-vote-btn:hover { background: var(--gray-50, #f9fafb); border-color: var(--gray-300, #d1d5db); color: var(--text, #1a2540); }

.al2-pp-dots {
  font-size: .55rem;
  color: #b91c1c;
  letter-spacing: .05em;
  min-width: 4em;
  text-align: center;
  white-space: nowrap;
}
.al2-pp-votes-num {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text, #1a2540);
  font-variant-numeric: tabular-nums;
  min-width: 1.4em;
  text-align: center;
}

.al2-pp-remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-300, #d1d5db);
  cursor: pointer;
  padding: 0 .25rem;
  flex-shrink: 0;
  transition: color .12s;
}
.al2-pp-remove:hover { color: #dc2626; }

@media (max-width: 800px) {
  .al2-pp-item {
    grid-template-columns: minmax(100px, max-content) 1fr auto;
    grid-template-areas:
      "cat mid remove"
      "vote vote vote";
    row-gap: .5rem;
  }
  .al2-pp-cat { grid-area: cat; }
  .al2-pp-mid { grid-area: mid; }
  .al2-pp-vote { grid-area: vote; justify-self: start; }
  .al2-pp-remove { grid-area: remove; align-self: start; }
}

/* Block 5 — Gebäudename in der Scope-Liste */
.b5-bld-name {
  font-size: .82rem;
  color: var(--gray-600, #4b5563);
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────────────
 * Workshop-Grundeinstellungen (Settings-Page)
 * ──────────────────────────────────────────────────────────────── */
.ws-settings-form { max-width: 640px; }
.ws-settings-card { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.ws-settings-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  border-top: 1px solid var(--gray-100, #f3f4f6);
}
.ws-settings-row:first-of-type { border-top: none; }
.ws-settings-row label {
  font-weight: 600;
  color: var(--gray-800, #1f2937);
  font-size: .9rem;
}
.ws-settings-input {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.ws-settings-input input[type="number"] {
  width: 90px;
  padding: .45rem .55rem;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  text-align: center;
}
.ws-settings-input input[type="number"]:focus { outline: none; border-color: var(--primary); }
.ws-settings-unit { color: var(--gray-500, #6b7280); font-size: .9rem; }
.ws-settings-hint {
  grid-column: 2;
  font-size: .8rem;
  color: var(--gray-500, #6b7280);
  margin: .15rem 0 0 0;
}
.ws-settings-actions { text-align: right; }

/* ────────────────────────────────────────────────────────────────
 * Workshop-Countdown (UC-Präsentation + Block 3 Voting)
 * ──────────────────────────────────────────────────────────────── */
.countdown-card {
  position: fixed;
  top: calc(56px + 0.75rem);   /* unter der 56px hohen Top-Bar */
  right: 1rem;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--gray-300, #d1d5db);
  border-radius: 10px;
  padding: .65rem 1rem .55rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  min-width: 110px;
  text-align: center;
  user-select: none;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.countdown-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
  margin-bottom: .2rem;
}
.countdown-time {
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.05;
}
.countdown-card--warn {
  background: #fef3c7;
  border-color: #f59e0b;
}
.countdown-card--warn .countdown-time { color: #92400e; }
.countdown-card--done {
  background: #fee2e2;
  border-color: #dc2626;
  box-shadow: 0 4px 14px rgba(220,38,38,0.25);
  animation: countdown-pulse 1.2s ease-in-out infinite;
}
.countdown-card--done .countdown-time { color: #b91c1c; }
.countdown-card--done .countdown-label { color: #b91c1c; }
@keyframes countdown-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* ═══════════════════════════════════════════════════════════════
   Portfolio-Dashboard (liegenschaften/index.html)
═══════════════════════════════════════════════════════════════ */

.dash-subtitle {
  margin: .25rem 0 0;
  color: var(--gray-500);
  font-size: .9rem;
}

/* KPI-Zeile */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 1100px) { .dash-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .dash-kpi-row { grid-template-columns: repeat(2, 1fr); } }

.dash-kpi {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .35rem;
  position: relative;
}
.dash-kpi-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  letter-spacing: -.01em;
}
.dash-kpi-unit {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-left: .15rem;
}
.dash-kpi-label {
  font-size: .72rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.dash-kpi-hint {
  display: inline-block;
  margin-left: .25rem;
  color: var(--gray-400);
  font-size: .8rem;
  cursor: help;
}
.dash-kpi-quality .dash-quality-track {
  margin-top: .35rem;
}

/* Mix-Charts */
.dash-mix-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 1280px) { .dash-mix-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px)  { .dash-mix-grid { grid-template-columns: 1fr; } }

.dash-mix-card {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.dash-section-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 .35rem;
  display: flex;
  align-items: baseline;
  gap: .4rem;
}
.dash-section-hint {
  font-size: .7rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.dash-section-sub {
  margin: 0 0 .75rem;
  color: var(--gray-500);
  font-size: .82rem;
}
.dash-empty-hint {
  margin: 0;
  color: var(--gray-400);
  font-size: .82rem;
  font-style: italic;
}

/* Bar-Reihe (in Mix-Charts) */
.dash-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
}
.dash-bar-label {
  color: var(--gray-700);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-bar-track {
  background: var(--gray-100);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width .3s ease;
}
.dash-bar-value {
  color: var(--gray-700);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dash-bar-pct {
  color: var(--gray-400);
  font-weight: 500;
}

/* Datenqualität */
.dash-quality-card {
  padding: 1.1rem 1.25rem 1.25rem;
  margin-bottom: 1.75rem;
}
.dash-quality-head { margin-bottom: .25rem; }
.dash-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem 1.5rem;
}
@media (max-width: 900px) { .dash-quality-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .dash-quality-grid { grid-template-columns: 1fr; } }

.dash-quality-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "row   row"
    "track pct";
  gap: .25rem .5rem;
  align-items: center;
}
.dash-quality-row {
  grid-area: row;
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
}
.dash-quality-label { color: var(--gray-700); font-weight: 600; }
.dash-quality-count { color: var(--gray-500); font-variant-numeric: tabular-nums; }
.dash-quality-track {
  grid-area: track;
  background: var(--gray-100);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}
.dash-quality-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .3s ease;
}
.dash-quality-fill.is-low  { background: var(--danger); }
.dash-quality-fill.is-mid  { background: var(--warning); }
.dash-quality-fill.is-high { background: var(--success); }
.dash-quality-pct {
  grid-area: pct;
  font-size: .78rem;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 34px;
  text-align: right;
}

/* Section-Header für Liste */
.dash-section-header {
  display: flex;
  align-items: baseline;
  gap: .65rem;
  margin: 0 0 1rem;
}
.dash-section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--gray-900);
}
.dash-section-count {
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 999px;
  padding: .15rem .6rem;
  font-size: .78rem;
  font-weight: 600;
}

/* Liegenschafts-Tiles */
.dash-ls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-ls-card {
  padding: 1.1rem 1.2rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: transform .12s ease, box-shadow .12s ease;
}
.dash-ls-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dash-ls-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.dash-ls-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--gray-900);
}
.dash-ls-addr {
  margin: .15rem 0 0;
  color: var(--gray-500);
  font-size: .82rem;
}
.dash-ls-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: .65rem .5rem;
}
.dash-ls-stat { text-align: center; }
.dash-ls-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.1;
}
.dash-ls-stat-unit {
  font-size: .7rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-left: .1rem;
}
.dash-ls-stat-label {
  font-size: .68rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .15rem;
}
.dash-ls-types {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.dash-ls-chip {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .75rem;
  font-weight: 600;
}
.dash-ls-chip-count {
  color: var(--primary);
  margin-left: .15rem;
  font-variant-numeric: tabular-nums;
}
.dash-ls-desc {
  margin: 0;
  color: var(--gray-500);
  font-size: .82rem;
  line-height: 1.45;
  border-top: 1px solid var(--gray-100);
  padding-top: .65rem;
}

/* Liegenschafts-Detail Header (Stand 2026-05-07) — bündelt Adresse,
   Beschreibung, Stats und Top-Typen, die bisher in der Übersichts-Tile
   waren. */
.ls-detail-header {
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.ls-detail-addr {
  margin: 0;
  color: var(--gray-500);
  font-size: .9rem;
}
.ls-detail-desc {
  margin: 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.5;
}
.ls-detail-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: .25rem;
}
.ls-detail-stat {
  text-align: left;
}
.ls-detail-stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ls-detail-stat-unit {
  font-size: .7rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-left: .15rem;
}
.ls-detail-stat-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  font-weight: 600;
  margin-top: .15rem;
}
.ls-detail-stat-hint {
  font-size: .7rem;
  color: var(--gray-400);
  margin-top: .25rem;
  max-width: 320px;
  line-height: 1.45;
}
.ls-detail-stat-hint-item {
  color: var(--gray-500);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.ls-detail-stat-hint-item:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.ls-detail-types {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.ls-detail-chip {
  background: var(--gray-100);
  color: var(--text);
  font-size: .75rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-weight: 500;
}
.ls-detail-chip-count {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  margin-left: .15rem;
}

/* Dezenter Danger-Bereich am Seitenende — bewusst unterspielt,
   damit „Löschen" nicht wie eine alltägliche Aktion aussieht. */
.ls-danger-zone {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  text-align: right;
}
.ls-danger-link {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: .8rem;
  cursor: pointer;
  padding: .25rem .5rem;
  text-decoration: none;
  transition: color .12s;
}
.ls-danger-link:hover {
  color: #dc2626;
  text-decoration: underline;
}

/* Gebäude-Matrix auf der Portfolio-Übersicht (ab 2026-05-07,
   ersetzt die Datenqualität-Card). */
.dash-matrix-card {
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
}
.dash-matrix-head { margin-bottom: 1rem; }
.dash-matrix-table-wrap { overflow-x: auto; }
.dash-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.dash-matrix-table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .5rem .65rem;
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
}
.dash-matrix-table tbody td {
  padding: .55rem .65rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.dash-matrix-table tbody tr:last-child td { border-bottom: none; }
.dash-matrix-table tbody tr:hover { background: var(--gray-50); }
.dash-matrix-ls {
  color: var(--gray-500);
  font-size: .78rem;
  white-space: nowrap;
}
.dash-matrix-bld {
  font-weight: 600;
  color: var(--text);
}
.dash-matrix-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 90px;
}
.dash-matrix-pill {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .2rem .6rem;
  border-radius: 4px;
  text-transform: uppercase;
}
.dash-matrix-pill--renoviert { background: #dcfce7; color: #166534; }
.dash-matrix-pill--bestand   { background: #fef3c7; color: #92400e; }
.dash-matrix-pill--unbekannt { background: var(--gray-100); color: var(--gray-500); }

/* ════════════════════════════════════════════════════════════
 * Mandanten-Verwaltung (Phase 3, ab 2026-05-10)
 * ════════════════════════════════════════════════════════════ */
.tenants-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .tenants-layout { grid-template-columns: 1fr; }
}

.tenants-list-card,
.tenants-create-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(30,45,90,0.06);
  padding: 1.25rem 1.5rem;
}

.tenants-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: .75rem;
  font-size: .9rem;
}
.tenants-table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
  padding: .5rem .6rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tenants-table thead th.num,
.tenants-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tenants-table tbody td {
  padding: .65rem .6rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.tenants-table tbody tr:hover { background: var(--gray-50); }
.tenants-table tbody tr.tenants-row--active {
  background: rgba(67,97,238,0.06);
}
.tenants-table tbody tr.tenants-row--active:hover {
  background: rgba(67,97,238,0.10);
}
.tenants-table code {
  background: var(--gray-100);
  padding: .12rem .4rem;
  border-radius: 4px;
  font-size: .82rem;
  color: var(--gray-700);
}

.tenants-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  margin-left: .35rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tenants-badge--default { background: var(--gray-100); color: var(--gray-600); }
.tenants-badge--active  { background: #dcfce7; color: #166534; }

.tenants-actions {
  display: flex;
  gap: .35rem;
  align-items: center;
  white-space: nowrap;
}

.tenants-create-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-top: .75rem;
}
.tenants-create-form label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.tenants-create-form input {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
}
.tenants-create-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.10);
}
.tenants-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gray-700);
}
.tenants-hint {
  font-size: .78rem;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.45;
}
.tenants-hint-inline {
  font-weight: 400;
  color: var(--gray-500);
  font-size: .78rem;
}

.tenants-confirm-input {
  width: 100%;
  padding: .55rem .7rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
}
.tenants-confirm-input:focus {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}

/* ── Mandanten-Dropdown (Basis, sitzt im Sidebar-Footer) ── */
.tenant-switcher {
  position: relative;
  display: flex;
  align-items: center;
}
.tenant-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: .35rem .65rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.tenant-switcher-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
}
.tenant-switcher-btn .ts-icon {
  opacity: .85;
}
.tenant-switcher-btn .ts-name {
  font-weight: 600;
}
.tenant-switcher-btn .ts-chevron {
  font-size: .65rem;
  opacity: .7;
}

.tenant-switcher-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 240px;
  z-index: 1000;
  padding: .35rem 0;
}
.tenant-switcher.open .tenant-switcher-menu { display: block; }
.tenant-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .5rem .85rem;
  font-size: .85rem;
  color: var(--gray-800);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.tenant-switcher-item:hover { background: var(--gray-50); }
.tenant-switcher-item--active {
  font-weight: 600;
  color: var(--primary);
}
.tenant-switcher-item--active::after {
  content: "✓";
  color: var(--primary);
}
.tenant-switcher-divider {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: .35rem 0;
}
.tenant-switcher-link {
  display: block;
  padding: .5rem .85rem;
  font-size: .82rem;
  color: var(--gray-600);
  text-decoration: none;
}
.tenant-switcher-link:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* ════════════════════════════════════════════════════════════
 * Management Summary (Phase 3+, ab 2026-05-11)
 * ════════════════════════════════════════════════════════════ */
.ms-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .ms-layout { grid-template-columns: 1fr; }
}
.ms-info-card,
.ms-hint-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(30,45,90,0.06);
  padding: 1.25rem 1.5rem;
}
.ms-toc {
  margin: .75rem 0 1.25rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.ms-toc li { font-size: .92rem; color: var(--gray-800); }
.ms-toc strong { display: block; font-weight: 700; color: var(--gray-900); }
.ms-toc-meta {
  display: block;
  margin-top: .15rem;
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.45;
}
.ms-toc-meta em { font-style: normal; color: var(--primary); font-weight: 600; }
.ms-meta {
  margin-top: 1rem;
  border-top: 1px solid var(--gray-100);
  padding-top: .9rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.ms-meta-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .85rem;
}
.ms-meta-label { color: var(--gray-500); min-width: 8rem; }
.ms-meta-value { color: var(--gray-800); }
.ms-hints {
  margin: .75rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  font-size: .85rem;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ── UC-Editor: Tag-Gewichtungs-Grid (Phase, ab 2026-05-11) ── */
.tag-weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .5rem;
  margin-top: .75rem;
}
.tag-weight-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .4rem .6rem;
}
.tag-weight-name {
  flex: 1;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-weight-input {
  width: 64px;
  padding: .25rem .4rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-family: inherit;
}
.tag-weight-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(67,97,238,0.15);
}
.tag-weight-unit {
  font-size: .78rem;
  color: var(--gray-500);
  font-weight: 600;
}
.tag-weight-hint {
  margin: .55rem 0 0;
  font-size: .78rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.tag-weight-sum {
  font-weight: 600;
  color: var(--gray-600);
  font-variant-numeric: tabular-nums;
  background: var(--gray-100);
  padding: .15rem .55rem;
  border-radius: 4px;
}
.tag-weight-sum--ok {
  background: #dcfce7;
  color: #166534;
}

/* ════════════════════════════════════════════════════════════════
   SRI-Methode — Erfassung & Ergebnis (Bewertungen-Container)
   ════════════════════════════════════════════════════════════════ */

/* ── Erfassung ── */
.sri-capture-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.sri-capture-method { font-size: .95rem; }
.sri-method-note { color: var(--gray-500); font-size: .82rem; margin-left: .35rem; }
.sri-capture-actions { display: flex; gap: .5rem; }

.sri-domain { padding: 0; margin-bottom: 1rem; overflow: hidden; }
.sri-domain-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 1.25rem; background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.sri-domain-head h3 { margin: 0; font-size: 1.02rem; color: var(--gray-900); }
.sri-triage { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.sri-triage-select { padding: .3rem .5rem; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; }

.sri-service-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sri-service-table thead th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--gray-500); padding: .55rem .75rem; border-bottom: 1px solid var(--gray-200);
}
.sri-service-table tbody td { padding: .5rem .75rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.sri-service-table tbody tr:hover { background: var(--gray-50); }
.sri-th-cov, .sri-th-add { width: 8rem; }
.sri-svc-name { max-width: 22rem; }
.sri-svc-code { display: inline-block; font-family: monospace; font-size: .78rem; color: var(--primary); background: var(--primary-light); padding: .05rem .35rem; border-radius: 4px; margin-right: .4rem; }
.sri-level { width: 100%; max-width: 24rem; padding: .3rem .45rem; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; }
.sri-coverage { width: 5rem; padding: .3rem .45rem; border: 1px solid var(--gray-300); border-radius: 6px; }
.sri-addlevel { padding: .3rem .45rem; border: 1px solid var(--gray-300); border-radius: 6px; background: #fff; }
.sri-comment { width: 100%; min-width: 8rem; padding: .3rem .45rem; border: 1px solid var(--gray-300); border-radius: 6px; }

.sri-capture-foot { display: flex; gap: .75rem; justify-content: flex-end; margin: 1.25rem 0; }

/* ── Fotodokumentation pro Domäne (Schritt 6) ── */
.sri-photo-section { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--gray-200); }
.sri-photo-head { margin: 0 0 .75rem; font-size: .92rem; color: var(--gray-700); font-weight: 600; }

/* ── Ergebnis ── */
.sri-warning { padding: 1rem 1.25rem; margin-bottom: 1rem; background: #fffbeb; border: 1px solid #fde68a; }
.sri-warning ul { margin: .4rem 0 0 1.1rem; font-size: .9rem; }

.sri-hero { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; padding: 1.5rem 1.75rem; margin-bottom: 1rem; }
.sri-hero-score { display: flex; align-items: center; gap: 1.25rem; }
.sri-class-badge {
  width: 72px; height: 72px; border-radius: 14px; color: #fff;
  font-size: 2.4rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.sri-class-A { background: #15803d; } .sri-class-B { background: #22c55e; }
.sri-class-C { background: #eab308; } .sri-class-D { background: #f97316; }
.sri-class-E { background: #ea580c; } .sri-class-F { background: #dc2626; }
.sri-class-G { background: #991b1b; }
.sri-hero-num { display: flex; flex-direction: column; }
.sri-hero-pct { font-size: 2.6rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.sri-hero-pct small { font-size: 1.2rem; font-weight: 600; color: var(--gray-500); }
.sri-hero-label { font-size: .85rem; color: var(--gray-500); margin-top: .25rem; }
.sri-hero-desc { flex: 1; min-width: 14rem; }
.sri-hero-method { font-weight: 600; color: var(--gray-700); margin-bottom: .35rem; }
.sri-hero-desc p { margin: 0; font-size: .9rem; color: var(--gray-600); line-height: 1.5; }

.sri-block { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.sri-block h3 { margin: 0 0 1rem 0; font-size: 1.05rem; }
.sri-bars { display: flex; flex-direction: column; gap: .6rem; }
.sri-bar-row { display: grid; grid-template-columns: 14rem 1fr 3rem; align-items: center; gap: .75rem; }
.sri-bar-label { font-size: .88rem; color: var(--gray-700); }
.sri-bar-track { background: var(--gray-100); border-radius: 6px; height: 12px; overflow: hidden; }
.sri-bar-fill { background: var(--primary); height: 12px; border-radius: 6px; }
.sri-bar-fill--alt { background: #7c3aed; }
.sri-bar-val { text-align: right; font-weight: 700; font-size: .88rem; color: var(--gray-900); }

.sri-domain-matrix { width: 100%; border-collapse: collapse; font-size: .82rem; }
.sri-domain-matrix th { text-align: center; font-size: .72rem; color: var(--gray-600); padding: .5rem .4rem; border-bottom: 2px solid var(--gray-200); }
.sri-domain-matrix th.sri-dm-domain, .sri-domain-matrix td.sri-dm-domain { text-align: left; font-weight: 600; }
.sri-domain-matrix td { padding: .35rem .4rem; text-align: center; border-bottom: 1px solid var(--gray-100); }
.sri-dm-cell { background: hsl(calc(var(--v) * 1.2), 60%, 90%); font-weight: 600; color: var(--gray-900); border-radius: 4px; }
.sri-dm-note { font-size: .8rem; color: var(--gray-500); margin: .75rem 0 0 0; }

@media (max-width: 720px) {
  .sri-bar-row { grid-template-columns: 9rem 1fr 2.5rem; }
  .sri-service-table { font-size: .8rem; }
}

/* ════════════════════════════════════════════════════════════
   Sprachumschalter im Benutzermenü
   Erbt Optik und Dropdown-Verhalten von .user-dropdown-item;
   ergänzt nur Gruppen-Label, Sprachkürzel und Aktiv-Haken.
   ════════════════════════════════════════════════════════════ */
.user-dropdown-group { padding: .35rem 0 .15rem; }
.user-dropdown-label {
  display: block;
  padding: .15rem 1rem .3rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
}
.user-dropdown-group form { margin: 0; }
.user-dropdown-item--lang {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.user-dropdown-item--lang .lang-code {
  flex-shrink: 0;
  min-width: 1.8rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray-500, #6b7280);
}
.user-dropdown-item--lang.is-active { font-weight: 600; color: var(--gray-900, #111827); }
.user-dropdown-item--lang.is-active .lang-code { color: var(--primary); }
.user-dropdown-item--lang .lang-check { margin-left: auto; color: var(--primary); }
/* Tastaturbedienung muss sichtbar bleiben — das Dropdown hat sonst nur
   :hover-Feedback, was für Nutzer ohne Maus unbrauchbar wäre. */
.user-dropdown-item--lang:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.user-dropdown-divider {
  border: none;
  border-top: 1px solid var(--gray-100, #f3f4f6);
  margin: .35rem 0;
}

/* ════════════════════════════════════════════════════════════
   Use-Case-Editor: Sprach-Umschalter
   ════════════════════════════════════════════════════════════ */
.uc-lang-bar {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  margin-bottom: .75rem;
}
.uc-lang-bar-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gray-500, #6b7280);
}
.uc-lang-tabs { display: inline-flex; gap: .25rem; }
.uc-lang-tab {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem; border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: .82rem; color: var(--gray-600, #4b5563);
}
.uc-lang-tab.is-active {
  background: var(--primary); border-color: var(--primary);
  color: #fff; font-weight: 600;
}
.uc-lang-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Punkt markiert: in dieser Sprache fehlen noch Übersetzungen. */
.uc-lang-todo { color: var(--warning, #ea580c); font-size: .7rem; line-height: 1; }
.uc-lang-tab.is-active .uc-lang-todo { color: #fff; }
.uc-lang-hint { font-size: .78rem; color: var(--gray-500, #6b7280); }

/* === Assistent ========================================================= */
.as-quick { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: .6rem .8rem; margin-bottom: 1.25rem; }
.as-quick-icon { color: var(--primary); display: flex; }
.as-quick input { flex: 1; border: none; outline: none; font-size: .95rem; background: transparent; }
.as-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.25rem; min-height: 60vh; }
@media (max-width: 900px) { .as-layout { grid-template-columns: 1fr; } }
.as-sidebar { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; }
.as-conv-list { list-style: none; margin: .5rem 0 1rem; padding: 0; flex: 1; overflow-y: auto; max-height: 55vh; }
.as-conv-item { width: 100%; text-align: left; background: none; border: none; padding: .45rem .55rem; border-radius: 8px; cursor: pointer; font-size: .88rem; color: var(--gray-700, #334); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-conv-item:hover { background: var(--gray-100); }
.as-conv-item.is-active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.as-usage { margin-top: auto; font-size: .78rem; }
.as-chat { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; display: flex; flex-direction: column; min-height: 60vh; }
.as-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.as-empty { margin: auto; text-align: center; color: var(--gray-500); max-width: 520px; }
.as-suggestions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.as-suggest { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 999px; padding: .4rem .8rem; font-size: .85rem; cursor: pointer; }
.as-suggest:hover { border-color: var(--primary); color: var(--primary); }
.as-msg { max-width: 85%; padding: .7rem .95rem; border-radius: 14px; font-size: .93rem; line-height: 1.5; }
.as-msg p { margin: 0 0 .4rem; } .as-msg p:last-child { margin-bottom: 0; }
.as-msg ul { margin: .2rem 0 .4rem 1.1rem; }
.as-msg code { background: rgba(0,0,0,.06); padding: .05rem .3rem; border-radius: 4px; font-size: .85em; }
.as-msg--user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.as-msg--user code { background: rgba(255,255,255,.2); }
.as-msg--assistant { align-self: flex-start; background: var(--gray-50); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; max-width: 95%; }
.as-status { color: var(--gray-500); font-style: italic; }
.as-error { color: var(--danger); margin-top: .4rem; font-size: .85rem; }
.as-sources { margin-top: .5rem; font-size: .75rem; color: var(--gray-500); }
.as-input { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--gray-200); }
.as-input textarea { flex: 1; resize: none; border: 1px solid var(--gray-300); border-radius: 10px; padding: .6rem .75rem; font: inherit; font-size: .93rem; }
.as-board { margin-top: .75rem; }
.as-board-title { font-weight: 700; margin-bottom: .5rem; }
.as-board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.as-widget { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: .7rem .8rem; min-width: 0; }
.as-widget--table, .as-widget--bar { grid-column: 1 / -1; }
.as-widget-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); margin-bottom: .4rem; }
.as-widget-error, .as-widget-empty { color: var(--gray-500); font-size: .85rem; }
.as-kpi { display: flex; align-items: baseline; gap: .4rem; }
.as-kpi-value { font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.as-kpi-unit { color: var(--gray-500); font-size: .85rem; }
.as-bars { display: flex; flex-direction: column; gap: .35rem; }
.as-bar-row { display: grid; grid-template-columns: minmax(80px, 180px) 1fr 56px; align-items: center; gap: .5rem; font-size: .85rem; }
.as-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-bar-track { background: var(--gray-100); border-radius: 999px; height: 10px; overflow: hidden; }
.as-bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.as-bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.as-table-wrap { overflow-x: auto; }
.as-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.as-table th, .as-table td { padding: .35rem .5rem; border-bottom: 1px solid var(--gray-100); text-align: left; white-space: nowrap; }
.as-table th { color: var(--gray-500); font-weight: 600; font-size: .75rem; text-transform: uppercase; }


/* ── Assistent: Dashboard-Panel neben dem Chat, gespeicherte Dashboards ── */
.as-layout.has-board { grid-template-columns: 220px minmax(300px, 5fr) minmax(360px, 6fr); }
.as-panel { display: none; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; flex-direction: column; min-height: 60vh; min-width: 0; }
.as-layout.has-board .as-panel { display: flex; }
@media (max-width: 1200px) {
  .as-layout.has-board { grid-template-columns: 220px 1fr; }
  .as-layout.has-board .as-panel { grid-column: 1 / -1; }
}
@media (max-width: 900px) { .as-layout.has-board { grid-template-columns: 1fr; } }
.as-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; padding: .9rem 1rem .4rem; }
.as-panel-heading { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.as-panel-title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-panel-close { background: none; border: none; font-size: 1.4rem; line-height: 1; color: var(--gray-500); cursor: pointer; padding: 0 .2rem; }
.as-panel-close:hover { color: var(--gray-900); }
.as-panel-actions { padding: 0 1rem .6rem; border-bottom: 1px solid var(--gray-200); }
.as-panel-save { display: flex; gap: .5rem; }
.as-panel-save input { flex: 1; min-width: 0; border: 1px solid var(--gray-300); border-radius: 8px; padding: .4rem .6rem; font: inherit; font-size: .88rem; }
.as-panel-saved { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .85rem; }
.as-saved-badge { color: var(--success); font-weight: 600; }
.as-panel-body { flex: 1; overflow-y: auto; padding: .9rem 1rem; }
.as-panel-empty { color: var(--gray-500); text-align: center; margin: 3rem 1rem; font-size: .9rem; }
.as-board-chip { display: inline-flex; align-items: center; gap: .35rem; margin: .4rem .4rem 0 0; padding: .3rem .65rem; border: 1px solid var(--gray-300); border-radius: 999px; background: #fff; color: var(--gray-700); font-size: .82rem; cursor: pointer; }
.as-board-chip:hover, .as-board-chip.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.as-board-chip-n { background: var(--gray-100); border-radius: 999px; padding: 0 .4rem; font-size: .75rem; }
.as-panel .as-board-grid, .as-detail-board .as-board-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.as-widget--chart, .as-widget--text { grid-column: 1 / -1; }
.as-chart { width: 100%; min-height: 120px; }
.as-chart .vega-embed { width: 100%; }
.as-chart .vega-embed svg { max-width: 100%; }
.as-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.as-widget-text p { margin: 0 0 .4rem; font-size: .9rem; }
.as-detail-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1rem; }
.as-detail-toggle { display: flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--gray-700); }
.as-detail-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.as-detail-board { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 1.25rem; }
.as-detail-board .as-board-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.as-detail-board .as-widget--chart, .as-detail-board .as-widget--bar, .as-detail-board .as-widget--table { grid-column: span 2; }
@media (max-width: 900px) { .as-detail-board .as-widget--chart, .as-detail-board .as-widget--bar, .as-detail-board .as-widget--table { grid-column: 1 / -1; } }
.as-table--list td, .as-table--list th { white-space: normal; }
.as-cell-wrap { max-width: 420px; color: var(--gray-600); }
.as-cell-actions { white-space: nowrap; text-align: right; }
.as-cell-actions .btn { margin-left: .3rem; }


/* ═══════════════════════════════════════════════════════════════
   Harmonisierung (Design-System 2026-09-06)

   Überschreibt seitenspezifische Komponenten aus dem gewachsenen Teil
   dieser Datei, damit Tabellen, Badges, Formularfelder, Kennzahlen,
   Dialoge und Menüs überall gleich aussehen. Bewusst am Dateiende,
   damit die Kaskade greift. Neue Seiten benutzen direkt die Klassen
   aus dem Kopf der Datei (.btn-*, .badge-*, .card, .form-group …).
   ═══════════════════════════════════════════════════════════════ */

/* --- Tabellen: ein Stil für alle Listen --- */
.services-table,
.eval-overview-table,
.tenants-table,
.as-table,
.dash-matrix-table,
.wud-table,
.rm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.services-table th,
.services-table thead th,
.eval-overview-table thead th,
.tenants-table thead th,
.as-table th,
.as-table thead th,
.dash-matrix-table th,
.dash-matrix-table thead th,
.wud-table th,
.rm-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  border-top: none;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-2);
  white-space: nowrap;
}
.services-table td,
.eval-overview-table tbody td,
.tenants-table tbody td,
.as-table td,
.dash-matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 20px;
}
.services-table tbody tr:last-child td,
.eval-overview-table tbody tr:last-child td,
.tenants-table tbody tr:last-child td,
.as-table tbody tr:last-child td,
.dash-matrix-table tbody tr:last-child td { border-bottom: none; }
.services-table tr:hover,
.services-table tbody tr:hover td,
.eval-overview-table tbody tr:hover,
.eval-overview-table tbody tr:hover td,
.tenants-table tbody tr:hover td,
.as-table tbody tr:hover td,
.dash-matrix-table tbody tr:hover td { background: #fafbfc; }
.card > .services-table,
.card > .services-table-wrap { margin: -1rem -1.25rem; width: calc(100% + 2.5rem); }
.card > .eval-overview-table { margin: 0; width: 100%; }
.card > .services-table-wrap > .services-table { width: 100%; }
.card > .services-table + *,
.card > .services-table-wrap + * { margin-top: 1.5rem; }
.eval-project-link { font-weight: 500; }

/* --- Status-Pillen -> eckige Badges --- */
.eval-method-status,
.eval-status-pill,
.dash-matrix-pill,
.overview-tile-badge,
.b2-tag,
.wud-tag,
.wud-quadrant-badge,
.b3-quadrant-badge,
.b6-prio,
.dash-section-count,
.dash-ls-chip,
.ls-detail-chip,
.tenants-badge,
.as-board-chip,
.as-board-chip-n,
.uc-kategorie-badge,
.uc-status-badge {
  border-radius: var(--radius-badge);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 12px;
}
.b2-filter-chip,
.zielfeld-chip,
.b2-counter,
.as-suggest { border-radius: var(--radius-sm); }
.eval-status--planned,
.eval-status--in_progress { background: var(--warning-light); color: var(--warning); }
.eval-status--external { background: var(--primary-light); color: var(--primary); }
.eval-status--available,
.eval-status--completed { background: var(--success-light); color: var(--success); }
.eval-status--archived { background: var(--gray-100); color: var(--gray-600); }
.eval-cell-link { border-radius: var(--radius-sm); background: var(--surface); }
.eval-cell--completed { background: var(--success-light); border-color: #b6dfc6; }
.eval-cell--in_progress { background: var(--warning-light); border-color: #f0d3a8; }
.eval-status-label--progress { color: var(--warning); }
.eval-score { font-weight: 600; }
.eval-cell-empty { border-radius: var(--radius-sm); border-width: 1px; }
.dash-matrix-pill--renoviert { background: var(--success-light); color: var(--success); }
.dash-matrix-pill--bestand { background: var(--warning-light); color: var(--warning); }
.dash-matrix-pill--unbekannt { background: var(--gray-100); color: var(--gray-600); }

/* --- Formulare --- */
.form-group label,
.tenants-label,
.ws-settings-row > label,
.field label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select,
.form-group textarea,
.tenants-create-form input,
.tenants-confirm-input,
.b3-confirm-input,
.ws-settings-input input,
.level-select,
.upload-preview-fields input,
.upload-preview-fields textarea,
.as-input,
.uc-field input,
.uc-field select,
.uc-field textarea {
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  color: var(--gray-900);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select,
.tenants-create-form input,
.tenants-confirm-input,
.b3-confirm-input,
.ws-settings-input input,
.uc-field input,
.uc-field select { height: 32px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.tenants-create-form input:focus,
.ws-settings-input input:focus,
.uc-field input:focus,
.uc-field select:focus,
.uc-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.tenants-confirm-input:focus,
.b3-confirm-input:focus { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
.form-group { margin-bottom: 1rem; }
.form-row { gap: 0.75rem; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem -1.25rem -1rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.form-actions .form-actions-note { margin-right: auto; font-size: 12px; color: var(--text-3); }
.form-actions form { display: contents; }
.form-fieldset { border: none; border-top: 1px solid var(--border); border-radius: 0; padding: 1rem 0 0; margin: 0.5rem 0 1rem; }
.form-fieldset legend {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 0 0.5rem 0 0;
}
.upload-hint, .label-sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* --- Meldungen (ohne Farbbalken links) --- */
.alert {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left-width: 1px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  background: var(--surface);
  color: var(--gray-900);
}
.alert-success { background: var(--success-light); border-color: #b6dfc6; color: #17663a; }
.alert-error,
.alert-danger { background: var(--danger-light); border-color: #eebcbc; color: #9a2020; }
.alert-warning { background: var(--warning-light); border-color: #f0d3a8; color: #8a4a08; }
.alert-info { background: var(--primary-light); border-color: var(--primary-light-border); color: #0b3f9e; }
.alert a { color: inherit; text-decoration: underline; }

/* --- Dialoge --- */
.modal,
.b3-confirm-modal {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
}
.modal-overlay,
.b3-confirm-overlay { background: rgba(27,31,39,0.42); }
.modal-header { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.modal-close { width: 28px; height: 28px; border-radius: var(--radius-sm); font-size: 1.25rem; color: var(--gray-600); }
.modal-body { padding: 1rem; }
.modal-footer,
.b3-confirm-btns {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.b3-confirm-title { font-size: 14px; font-weight: 600; }

/* --- Kennzahlen --- */
.dash-kpi,
.b6-kpi,
.ls-detail-stat { box-shadow: none; border: 1px solid var(--border); border-radius: var(--radius); }
.dash-kpi-val,
.b6-kpi-val,
.ls-detail-stat-val {
  font-size: 24px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--gray-900);
}
.dash-kpi-label,
.b6-kpi-label,
.ls-detail-stat-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-2);
}
.dash-kpi-unit,
.ls-detail-stat-unit { font-size: 14px; font-weight: 500; color: var(--text-3); }
.dash-section-title { font-size: 14px; line-height: 20px; font-weight: 600; }
.dash-quality-fill { background: var(--success); }

/* --- Karten-Varianten: flach, ohne Hover-Schatten --- */
.project-card:hover,
.overview-tile:hover,
.uc-card:hover,
.eval-method-card:hover,
.tenants-list-card,
.tenants-create-card,
.ms-info-card,
.dash-mix-card,
.dash-matrix-card { box-shadow: none; transform: none; }
.project-card,
.overview-tile,
.tenants-list-card,
.tenants-create-card,
.ms-info-card { border: 1px solid var(--border); border-radius: var(--radius); }
.project-card:hover,
.overview-tile:hover { border-color: var(--border-strong); }
.project-card-placeholder { background: var(--gray-100); color: var(--gray-400); }
.project-meta .label { font-weight: 500; color: var(--text-2); }
.project-meta-facts { background: var(--surface-2); border-radius: var(--radius-badge); }
.project-score-row { border-radius: var(--radius-sm); background: var(--surface-2); }
.empty-state { padding: 3.5rem 1rem; }
.empty-state h2 { font-size: 16px; font-weight: 600; color: var(--gray-700); }
.empty-state p { font-size: 14px; color: var(--text-2); }

/* --- Mandanten-Umschalter im Sidebar-Footer (ganz unten) --- */
.sidebar-footer {
  flex: 0 0 auto;
  padding: 8px;
  border-top: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
}
.sidebar-footer .tenant-switcher { width: 100%; }
.tenant-switcher-btn {
  width: 100%;
  min-height: 36px;
  padding: 0 0.625rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 400;
  border-radius: var(--radius-sm);
  gap: 0.5rem;
  justify-content: flex-start;
  overflow: hidden;
  white-space: nowrap;
}
.tenant-switcher-btn:hover { background: var(--surface-2); border-color: #b4b9c1; }
.tenant-switcher-btn .ts-icon { color: var(--gray-500); opacity: 1; flex: 0 0 auto; }
.tenant-switcher-btn .ts-label { display: none; }
.tenant-switcher-btn .ts-name { font-weight: 500; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.tenant-switcher-btn .ts-chevron { color: var(--gray-500); opacity: 1; flex: 0 0 auto; transform: rotate(180deg); }
/* Menü klappt nach oben auf, füllt die Sidebar-Breite */
.tenant-switcher-menu {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 4px;
}
.tenant-switcher-item { height: 32px; padding: 0 0.625rem; border-radius: 4px; font-size: 13px; color: var(--gray-900); }
.tenant-switcher-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant-switcher-item:hover { background: var(--gray-100); }
.tenant-switcher-item--active { font-weight: 500; }
.tenant-switcher-link { padding: 0.375rem 0.625rem; font-size: 13px; border-radius: 4px; }
.tenant-switcher-divider { border-top-color: var(--border); }
/* Eingeklappte Sidebar: nur Icon, Menü öffnet rechts neben der Leiste */
.app-layout.sidebar-collapsed .sidebar-footer { padding: 8px 6px; }
.app-layout.sidebar-collapsed .tenant-switcher-btn { padding: 0; justify-content: center; }
.app-layout.sidebar-collapsed .tenant-switcher-btn .ts-label,
.app-layout.sidebar-collapsed .tenant-switcher-btn .ts-name,
.app-layout.sidebar-collapsed .tenant-switcher-btn .ts-chevron { display: none; }
.app-layout.sidebar-collapsed .tenant-switcher-menu {
  left: calc(100% + 8px);
  right: auto;
  bottom: 0;
  min-width: 240px;
}

/* --- Speicher-Status neben dem Primär-Button --- */
.save-status { font-size: 12px; color: var(--text-3); }

/* --- Sonstiges --- */
.al2-header-actions,
.rm-header-actions,
.b3-header-actions,
.as-detail-buttons { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.b3-voter-btn { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--gray-900); cursor: pointer; }
.b3-voter-btn:hover { background: var(--surface-2); }
.ls-danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.ls-danger-link { font-size: 13px; color: var(--danger); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.ls-danger-link:hover { text-decoration: underline; }
.uc-lang-tab.is-active { color: var(--primary); border-color: var(--primary); }
.card-section-title { color: var(--gray-500); }

/* --- Kennzahlen: Bezeichner über dem Wert --- */
.dash-kpi, .b6-kpi, .ls-detail-stat { display: flex; flex-direction: column; gap: 4px; }
.dash-kpi-label, .b6-kpi-label, .ls-detail-stat-label { order: -1; }
.ls-detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 0.75rem; }
.ls-detail-stat { padding: 12px 16px; }
.ls-detail-stat-hint { font-size: 12px; line-height: 16px; color: var(--text-3); margin-top: 4px; }
.ls-detail-stat-hint-item { color: var(--text-2); }
.dash-bar-row { font-size: 13px; }
.dash-bar-label { font-weight: 400; color: var(--gray-900); }

/* --- Kebab-Buttons überall tertiär --- */
.kebab-btn, .uc-kebab-btn {
  width: 28px; height: 28px; gap: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--gray-600);
}
.kebab-btn:hover, .uc-kebab-btn:hover { background: #eceef1; color: var(--gray-900); }
.kebab-btn span { background: currentColor; }

/* --- Use-Case-Badges: eckig, ohne Versalien --- */
.uc-badge { border-radius: var(--radius-badge); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }

/* --- Sidebar-Chevrons --- */
.nav-chevron { font-size: 11px; color: var(--gray-500); }
