/* =====================================================================
   FV-Detailansicht – Prototyp-Stylesheet (Basis: Rahmenvertrag-Prototyp shared.css, Tokens aus app.css / design-tokens.yaml)
   Spiegelt die echten PartnerHub-Tokens (Stand 04.10.2026):
     - /workspace/prometheus/assets/styles/app.css  (@theme: Farben, Fonts)
     - /workspace/prometheus/config/design-tokens.yaml (Spacing, Radius, Shadow, z-Index, Weights, Text)
     - /workspace/prometheus/docs/patterns/design-tokens.md (State-Farben, Layout-Tokens, Buttons)
   App-Shell nach templates/layouts/pages/layout_app.html.twig,
   partials/_globals/app-header + app-sidebar.
   KEIN Build-Schritt; Klassen sind bewusst nah an den Tailwind-/Twig-Atomen benannt.
   ===================================================================== */

:root {
  /* --- Fonts (app.css @theme) --- */
  --font-sans: 'IBM Plex Sans', 'Open Sans', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Nunito', ui-serif, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* --- Brand (app.css @theme) --- */
  --color-primary: #143cdc;
  --color-primary-light: #489ff6;
  --color-primary-dark: #12268f;
  --color-secondary: #bd2fbd;
  --color-secondary-light: #cc66cc;
  --color-secondary-dark: #7d217d;
  --color-pink: #bd2ebd;
  --color-pink-50: #f8f4f8;
  --color-pink-100: #f0e5f0;
  --color-pink-200: #e5cce5;
  --color-blue-50: #eff6ff;
  --color-blue-100: #deecfe;
  --color-blue-200: #bcdaff;
  --color-blue-300: #8ebffa;
  --color-blue-400: #489ff6;
  --color-blue-500: #0f6fde;
  --color-blue-600: #143cdc;
  --color-blue-700: #1431b0;
  --color-blue-800: #12268f;
  --color-green: #91cd50;

  /* --- Tailwind-Standardgrau (Text: gray-500..900; NIE Custom-Gray als Text) --- */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* --- State-Farben (design-tokens.md §4, -800 auf -50) --- */
  --emerald-50: #ecfdf5;  --emerald-100: #d1fae5; --emerald-200: #a7f3d0; --emerald-300: #6ee7b7;
  --emerald-600: #059669; --emerald-700: #047857; --emerald-800: #065f46;
  --red-50: #fef2f2; --red-100: #fee2e2; --red-300: #fca5a5; --red-600: #dc2626; --red-700: #b91c1c; --red-800: #991b1b;
  --yellow-50: #fefce8; --yellow-300: #fde047; --yellow-800: #854d0e;
  --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-200: #fde68a; --amber-500: #f59e0b; --amber-800: #92400e;
  --orange-100: #ffedd5; --orange-800: #9a3412;
  --purple-100: #f3e8ff; --purple-800: #6b21a8;

  /* --- Spacing-Skala (yaml: 1,2,4,6,8,12,16 → 4/8/16/24/32/48/64px) --- */
  --sp-1: 4px; --sp-2: 8px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;

  /* --- Radius (yaml: xs, md, lg, 2xl, full) --- */
  --radius-xs: 2px; --radius-md: 6px; --radius-lg: 8px; --radius-2xl: 16px; --radius-full: 9999px;

  /* --- Shadows (yaml: xs, sm, md, lg) --- */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* --- Layout (design-tokens.md §13) --- */
  --sidebar-w: 256px;       /* w-64 */
  --header-h: 3.75rem;      /* 60px */
  --content-max: 1536px;    /* max-w-(--breakpoint-2xl) */

  /* --- Primary-Button-Gradient (app.css @utility bg-gradient-button-primary) --- */
  --gradient-primary: linear-gradient(to bottom right in oklab, var(--color-blue-600) 0%, var(--color-blue-600) 50%, var(--color-pink) 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;               /* text-base = Default (PH-211) */
  line-height: 1.5;
  color: var(--gray-900);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--color-blue-600); text-decoration: none; }
a:hover { color: var(--color-pink); text-decoration: underline; }
button { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* =========================== App-Shell =========================== */
/* app-header.html.twig: bg-white border-b border-gray-200 h-[3.75rem] px-4 py-2.5 fixed z-50 */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h); background: #fff; border-bottom: 1px solid var(--gray-200);
  padding: 10px var(--sp-4);
  display: flex; align-items: center; justify-content: space-between;
}
.app-header__left { display: flex; align-items: center; gap: var(--sp-4); }
.app-header__logo img { height: 40px; display: block; }
.app-header__partner { color: var(--gray-900); }
.app-header__right { display: flex; align-items: center; gap: var(--sp-4); }
.app-header__user { width: 32px; height: 32px; color: var(--color-primary); display: inline-flex; }
.app-header__user:hover { color: var(--color-pink); }
.role-switch {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 12px; color: var(--gray-600);
  border: 1px dashed var(--gray-300); border-radius: var(--radius-md); padding: var(--sp-1) var(--sp-2);
}
.role-switch select { font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--gray-900); font-weight: 500; }

/* app-sidebar.html.twig: fixed top-0 left-0 z-40 w-64 h-screen pt-14 bg-white border-r border-gray-200 */
.app-sidebar {
  position: fixed; top: 0; left: 0; z-index: 40; width: var(--sidebar-w); height: 100vh;
  padding-top: 56px; background: #fff; border-right: 1px solid var(--gray-200);
}
.app-sidebar__inner { overflow-y: auto; height: 100%; padding: 20px 12px; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.nav + .nav { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--gray-200); }
/* nav-item.html.twig: flex items-center p-2 text-base font-medium rounded-lg hover:bg-gray-100; aktiv text-blue-600 bg-gray-100 */
.nav-item {
  display: flex; align-items: center; padding: var(--sp-2); font-size: 16px; font-weight: 500;
  border-radius: var(--radius-lg); color: var(--gray-900); text-decoration: none;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.nav-item.is-active { color: var(--color-blue-600); background: var(--gray-100); }
.nav-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.nav-item span { margin-left: 12px; margin-right: 8px; }
.nav-item .nav-new {
  margin-left: auto; font-size: 12px; font-weight: 500; line-height: 1;
  background: var(--color-pink); color: #fff; border-radius: var(--radius-full); padding: 4px 8px;
}
.nav-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); padding: 0 var(--sp-2) var(--sp-1); }

/* layout_app: main md:ml-64 bg-gray-50; Inhalt p-4 lg:px-8 lg:pt-24 lg:py-8 max-w-2xl */
.app-main { margin-left: var(--sidebar-w); min-height: 100vh; background: var(--gray-50); }
.app-main.has-actions { padding-bottom: 96px; }
.app-content { padding: 96px var(--sp-8) var(--sp-8); max-width: var(--content-max); }
.stack-8 > * + * { margin-top: var(--sp-8); }
.stack-6 > * + * { margin-top: var(--sp-6); }
.stack-4 > * + * { margin-top: var(--sp-4); }
.stack-2 > * + * { margin-top: var(--sp-2); }

/* Page-Actions-Leiste (layout_app pageActions): fixed bottom-0 bg-gray-50 border-t p-4 z-20 */
.page-actions {
  position: fixed; bottom: 0; right: 0; z-index: 20; width: calc(100% - var(--sidebar-w));
  background: var(--gray-50); border-top: 1px solid var(--gray-200); box-shadow: 0 5px 25px rgba(0,0,0,.2);
  padding: var(--sp-4) var(--sp-8);
}
.page-actions__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); max-width: var(--content-max); }
.page-actions__group { display: flex; align-items: center; gap: var(--sp-4); }

/* Prototyp-Hinweis */
.proto-ribbon {
  font-size: 12px; color: var(--amber-800); background: var(--amber-50); border: 1px solid var(--amber-200);
  border-radius: var(--radius-full); padding: 2px var(--sp-2); white-space: nowrap;
}

/* =========================== Typografie =========================== */
.back-link { font-size: 14px; color: var(--color-primary); }
.h1 { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 36px; color: var(--gray-900); }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; color: var(--gray-900); }
.h3 { font-size: 20px; line-height: 28px; font-weight: 500; color: var(--gray-900); }
.h4 { font-size: 16px; font-weight: 500; color: var(--gray-900); }
.lead { color: var(--gray-500); margin-top: var(--sp-2); }
.muted { color: var(--gray-500); }
.small { font-size: 14px; }
.xs { font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 14px; }
.topline { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--color-blue-600); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-6); }
.page-head > :first-child { min-width: 0; flex: 1 1 auto; }
.page-head > :last-child:not(:first-child) { flex-shrink: 0; }
.page-head__meta { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; margin-top: var(--sp-2); }

/* =========================== Karten =========================== */
/* card.html.twig: space-y-4 rounded-lg border border-gray-100 bg-white p-6 shadow-xs; Titel text-lg font-bold */
.card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--sp-6); }
.card > * + * { margin-top: var(--sp-4); }
.card__title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.card--flush { padding: 0; }
.card--flush > * + * { margin-top: 0; }
.card--flush .card__head { padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--gray-200); }
.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-aside { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.grid-split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--sp-6); align-items: start; }
.gap-6 { gap: var(--sp-6); }

/* dl wie commissions/show: grid-cols-[auto_1fr] gap-x-6 gap-y-2 */
.dl { display: grid; grid-template-columns: fit-content(35%) minmax(0, 1fr); gap: var(--sp-2) var(--sp-6); margin: 0; }
.dl dt { color: var(--gray-500); }
.dl dd { margin: 0; color: var(--gray-900); font-weight: 500; min-width: 0; overflow-wrap: break-word; }
.dl dd .tag-ent, .dl dd .tag-wid, .dl dd .tag-luecke { white-space: normal; }

/* Kennzahl-Kacheln (dashboard-widget) */
.stat { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--sp-4) var(--sp-6); }
.stat__label { font-size: 14px; color: var(--gray-500); }
.stat__value { font-size: 24px; font-weight: 700; line-height: 1; margin-top: var(--sp-2); color: var(--gray-900); }
.stat__sub { font-size: 12px; color: var(--gray-500); margin-top: var(--sp-2); }

/* =========================== Buttons (button.html.twig) =========================== */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2); justify-content: center;
  font: inherit; font-weight: 500; font-size: 16px; line-height: 1.5; text-align: center;
  padding: 12px 20px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
  transition: all .3s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgb(72 159 246 / .5); } /* focus:ring-4 ring-primary-light */
.btn--small { padding: 8px 16px; font-size: 14px; }
.btn--tiny { padding: 4px 8px; font-size: 12px; }
.btn--primary { color: #fff; background-image: var(--gradient-primary); background-size: 100% 100%; background-position: bottom right; }
.btn--primary:hover { color: #fff; background-size: 1000% 10000%; }
.btn--blue { color: #fff; background: var(--color-primary); }
.btn--blue:hover { color: #fff; background: var(--color-pink); }
.btn--white { color: var(--gray-900); background: #fff; border-color: var(--gray-300); }
.btn--white:hover { background: var(--gray-100); color: var(--color-blue-600); }
.btn--blue-outline { color: var(--color-blue-600); border-color: var(--color-blue-600); background: #fff; }
.btn--blue-outline:hover { color: #fff; background: var(--color-blue-600); }
.btn--red { color: #fff; background: var(--red-700); }
.btn--red:hover { color: #fff; background: #7f1d1d; }
.btn--red-outline { color: var(--red-700); border-color: var(--red-700); background: #fff; }
.btn--red-outline:hover { color: #fff; background: var(--red-800); }
.btn--green { color: #fff; background: var(--emerald-600); }
.btn--green:hover { color: #fff; background: var(--emerald-800); }
.btn--ghost { color: var(--gray-600); background: transparent; }
.btn--ghost:hover { background: var(--gray-100); color: var(--gray-700); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

/* =========================== Badges (badge.html.twig) =========================== */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  font-size: 12px; font-weight: 500; line-height: 1; padding: 4px 10px; border-radius: var(--radius-full); white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--white { background: #fff; color: var(--gray-500); border: 1px solid var(--gray-100); }
.badge--green-light { background: var(--emerald-100); color: var(--emerald-800); }
.badge--green { background: var(--emerald-200); color: var(--emerald-800); }
.badge--yellow { background: var(--amber-100); color: var(--amber-800); }
.badge--orange { background: var(--orange-100); color: var(--orange-800); }
.badge--red { background: var(--red-100); color: var(--red-800); }
.badge--blue { background: var(--color-blue-100); color: var(--color-blue-800); }
.badge--blue-dark { background: var(--color-blue-600); color: #fff; }
.badge--pink { background: var(--color-pink); color: #fff; }
.badge--purple { background: var(--purple-100); color: var(--purple-800); }
.badge--gray { background: var(--gray-200); color: var(--gray-800); }

/* =========================== Banner / Hinweise (inline-banner, flash-message) =========================== */
.banner { display: flex; gap: var(--sp-4); align-items: flex-start; border: 1px solid; border-radius: var(--radius-lg); padding: var(--sp-4); }
.banner svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.banner__title { font-weight: 600; }
.banner--info { background: var(--color-blue-50); color: var(--color-blue-800); border-color: var(--color-blue-300); }
.banner--success { background: var(--emerald-50); color: var(--emerald-800); border-color: var(--emerald-300); }
.banner--warning { background: var(--yellow-50); color: var(--yellow-800); border-color: var(--yellow-300); }
.banner--amber { background: var(--amber-50); color: var(--amber-800); border-color: var(--amber-200); }
.banner--danger { background: var(--red-50); color: var(--red-800); border-color: var(--red-300); }
.banner ul { margin: var(--sp-2) 0 0; padding-left: 20px; }
.banner .btn { margin-left: auto; }

/* =========================== Formulare (layouts/forms/default) =========================== */
.field { display: grid; gap: var(--sp-2); }
.field label, .label { font-weight: 500; color: var(--gray-900); }
.field .hint { font-size: 14px; color: var(--gray-500); }
.input, .select, .textarea {
  font: inherit; font-size: 16px; color: var(--gray-900); background: var(--gray-50);
  border: 1px solid var(--gray-300); border-radius: var(--radius-md); padding: 10px 12px; width: 100%;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgb(72 159 246 / .35); position: relative; z-index: 10; }
.input.is-error, .select.is-error { border-color: var(--red-600); background: var(--red-50); }
.input.is-warn { border-color: var(--amber-500); background: var(--amber-50); }
.input.is-changed { border-color: var(--color-blue-500); background: var(--color-blue-50); }
.field-error { font-size: 14px; color: var(--red-700); display: flex; gap: var(--sp-1); align-items: flex-start; }
.field-error svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.textarea { min-height: 96px; resize: vertical; }
.checkbox { display: flex; gap: var(--sp-2); align-items: flex-start; }
.checkbox input { width: 16px; height: 16px; margin-top: 4px; accent-color: var(--color-primary); }

/* Dropzone (layouts/forms/dropzone.html.twig) */
.dropzone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); background: var(--gray-50);
  padding: var(--sp-8); text-align: center; color: var(--gray-500); cursor: pointer; transition: all .3s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--color-primary); background: var(--color-blue-50); }
.dropzone svg { width: 48px; height: 48px; color: var(--gray-400); }
.dropzone strong { color: var(--color-blue-600); font-weight: 500; }

/* =========================== Tabellen (data-table) =========================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-700); background: var(--gray-50); padding: 12px var(--sp-4); font-weight: 600; border-bottom: 1px solid var(--gray-200); }
.table td { padding: 12px var(--sp-4); border-bottom: 1px solid var(--gray-100); color: var(--gray-900); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--gray-50); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.is-flagged td { background: var(--red-50); }
.table tr.is-flagged:hover td { background: var(--red-50); }
.table a.row-link { font-weight: 500; }

/* =========================== Tabs =========================== */
.tabs { display: flex; gap: var(--sp-6); border-bottom: 1px solid var(--gray-200); overflow-x: auto; }
.tabs a { padding: 12px 0; color: var(--gray-500); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: var(--sp-2); align-items: center; }
.tabs a:hover { color: var(--gray-900); text-decoration: none; border-color: var(--gray-300); }
.tabs a.is-active { color: var(--color-primary); border-color: var(--color-primary); }
.tabs .count { font-size: 12px; line-height: 1; padding: 3px 7px; border-radius: var(--radius-full); background: var(--gray-200); color: var(--gray-800); }
.tabs .count--red { background: var(--red-100); color: var(--red-800); }

/* =========================== Statusleiste (wie commission-status-bar) =========================== */
.statusbar { display: flex; list-style: none; margin: 0; padding: 0; gap: var(--sp-1); align-items: center; }
.statusbar li { display: flex; align-items: center; gap: var(--sp-2); flex: 1 1 0; min-width: 0; }
.statusbar li:not(:last-child)::after { content: ''; flex: 1 1 auto; height: 0; border-bottom: 1px solid var(--gray-200); margin: 0 var(--sp-2); min-width: 8px; }
.statusbar .dot { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: var(--gray-200); color: var(--gray-600); }
.statusbar .lbl { font-size: 14px; color: var(--gray-600); line-height: 1.25; }
.statusbar li.is-done .dot { background: var(--emerald-600); color: #fff; }
.statusbar li.is-done .lbl { color: var(--emerald-700); }
.statusbar li.is-current .dot { background: var(--color-blue-600); color: #fff; }
.statusbar li.is-current .lbl { color: var(--color-blue-700); font-weight: 600; }
.statusbar li.is-rework .dot { background: var(--amber-500); color: #fff; }
.statusbar li.is-rework .lbl { color: var(--amber-800); font-weight: 600; }
.statusbar li.is-rejected .dot { background: var(--red-700); color: #fff; }
.statusbar li.is-rejected .lbl { color: var(--red-700); font-weight: 600; }
.statusbar .dot svg { width: 16px; height: 16px; }

/* Historie (activity-log / event-log) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 var(--sp-4) 28px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; border-left: 1px solid var(--gray-200); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: var(--radius-full); background: #fff; border: 3px solid var(--gray-300); }
.timeline .tl-dot--blue { border-color: var(--color-blue-600); }
.timeline .tl-dot--green { border-color: var(--emerald-600); }
.timeline .tl-dot--amber { border-color: var(--amber-500); }
.timeline .tl-dot--red { border-color: var(--red-700); }
.timeline .tl-head { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.timeline .tl-title { font-weight: 500; font-size: 14px; }
.timeline .tl-meta { font-size: 12px; color: var(--gray-500); }
.timeline .tl-text { font-size: 14px; color: var(--gray-700); margin-top: 2px; }

/* =========================== Wizard-Schritte (Partner) =========================== */
.steps { display: flex; gap: var(--sp-2); list-style: none; padding: 0; margin: 0; }
.steps li { flex: 1; border-top: 4px solid var(--gray-200); padding-top: var(--sp-2); font-size: 14px; color: var(--gray-500); }
.steps li b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.steps li.is-done { border-color: var(--emerald-600); color: var(--emerald-700); }
.steps li.is-current { border-color: var(--color-blue-600); color: var(--color-blue-700); }

/* =========================== Dokument-Vorschau / OCR =========================== */
.doc-preview { background: var(--gray-200); border-radius: var(--radius-lg); padding: var(--sp-6); position: sticky; top: 84px; }
.doc-page { background: #fff; box-shadow: var(--shadow-md); border-radius: var(--radius-xs); padding: var(--sp-8) var(--sp-8); font-size: 11px; line-height: 1.55; color: var(--gray-700); min-height: 560px; position: relative; }
.doc-page h5 { font-size: 13px; margin: 0 0 var(--sp-2); color: var(--gray-900); text-align: center; letter-spacing: .03em; }
.doc-page p { margin: 0 0 var(--sp-2); }
.doc-page .hl { background: rgb(72 159 246 / .18); outline: 1px solid rgb(20 60 220 / .45); border-radius: var(--radius-xs); padding: 0 2px; }
.doc-page .hl--warn { background: rgb(245 158 11 / .2); outline-color: rgb(245 158 11 / .8); }
.doc-page .hl--err { background: rgb(220 38 38 / .12); outline-color: rgb(220 38 38 / .7); }
.doc-page .sig { display: flex; gap: var(--sp-8); margin-top: var(--sp-8); }
.doc-page .sig div { flex: 1; border-top: 1px solid var(--gray-400); padding-top: var(--sp-1); font-size: 10px; }
.doc-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); font-size: 14px; color: var(--gray-700); }

.ocr-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: var(--sp-4); align-items: start; padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.ocr-row:last-child { border-bottom: 0; }
.ocr-row__label { font-weight: 500; padding-top: 10px; }
.ocr-row__label small { display: block; font-weight: 400; font-size: 12px; color: var(--gray-500); }
.ocr-row__conf { padding-top: 10px; text-align: right; }
.conf { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--gray-600); }
.conf__bar { width: 80px; height: 6px; border-radius: var(--radius-full); background: var(--gray-200); overflow: hidden; }
.conf__bar i { display: block; height: 100%; background: var(--emerald-600); }
.conf--mid .conf__bar i { background: var(--amber-500); }
.conf--low .conf__bar i { background: var(--red-600); }
.ocr-group { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); font-weight: 600; padding-top: var(--sp-4); }

/* Mängel-Zeilen Formal-Check */
.check-row { display: grid; grid-template-columns: 28px 200px minmax(0, 1fr) 260px; gap: var(--sp-4); align-items: start; padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--gray-100); }
.check-row:last-child { border-bottom: 0; }
.check-row.is-mangel { background: var(--red-50); }
.check-row.is-hinweis { background: var(--amber-50); }
.check-icon { width: 24px; height: 24px; }
.check-icon--ok { color: var(--emerald-600); }
.check-icon--err { color: var(--red-700); }
.check-icon--warn { color: var(--amber-500); }
.check-icon--open { color: var(--gray-400); }
.seg { display: inline-flex; border: 1px solid var(--gray-300); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.seg button { font: inherit; font-size: 14px; padding: 6px 12px; border: 0; background: transparent; color: var(--gray-700); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--gray-300); }
.seg button.is-on-ok { background: var(--emerald-600); color: #fff; }
.seg button.is-on-err { background: var(--red-700); color: #fff; }
.seg button.is-on-warn { background: var(--amber-500); color: #fff; }

/* Fortschritt / Budgetbalken */
.meter { height: 10px; border-radius: var(--radius-full); background: var(--gray-200); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.meter .m-used { background: var(--color-blue-600); }
.meter .m-reserved { background: var(--color-blue-300); }
.meter .m-pink { background: var(--color-pink); }
.legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: 12px; color: var(--gray-600); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: var(--radius-xs); margin-right: 6px; vertical-align: -1px; background: var(--gray-200); }
.legend .l-used::before { background: var(--color-blue-600); }
.legend .l-reserved::before { background: var(--color-blue-300); }

/* Datei-Zeile */
.file-row { display: flex; align-items: center; gap: var(--sp-4); padding: 12px var(--sp-4); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: #fff; }
.file-row + .file-row { margin-top: var(--sp-2); }
.file-row__icon { width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--red-50); color: var(--red-700); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.file-row__main { flex: 1; min-width: 0; }
.file-row__name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__meta { font-size: 12px; color: var(--gray-500); }
.progress { height: 4px; background: var(--gray-200); border-radius: var(--radius-full); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--color-blue-600); }

/* Modal (modal.html.twig) */
.modal-backdrop { position: fixed; inset: 0; background: rgb(17 24 39 / .5); z-index: 50; display: none; align-items: center; justify-content: center; padding: var(--sp-4); }
.modal-backdrop.is-open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-4) var(--sp-6); border-bottom: 1px solid var(--gray-200); }
.modal__title { font-size: 18px; font-weight: 600; }
.modal__body { padding: var(--sp-6); }
.modal__body > * + * { margin-top: var(--sp-4); }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--sp-4); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--gray-200); }

/* Toast */
.toast { position: fixed; top: 76px; right: var(--sp-6); z-index: 50; display: none; }
.toast.is-open { display: block; }

/* Utilities */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); } .gap-4 { gap: var(--sp-4); } .wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; } .mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); }
.text-right { text-align: right; } .nowrap { white-space: nowrap; }
.text-green { color: var(--emerald-700); } .text-red { color: var(--red-700); } .text-amber { color: var(--amber-800); } .text-blue { color: var(--color-blue-600); }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; }
.divider { border: 0; border-top: 1px solid var(--gray-200); margin: var(--sp-4) 0; }
.hidden { display: none !important; }
.kbd-note { font-size: 12px; color: var(--gray-500); }

/* =========================== Phase 1 (05.10.2026): Partner „Meine Rahmen“, Pflege-Liste =========================== */
.phase2-hint { border: 1px dashed var(--gray-300); background: var(--gray-50); border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-6); color: var(--gray-500); }
.phase2-hint .badge { opacity: .9; }
.phase2-hint ul { margin: var(--sp-2) 0 0; padding-left: 20px; font-size: 14px; }
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip { font: inherit; font-size: 14px; padding: 4px 12px; border-radius: var(--radius-full); border: 1px solid var(--gray-300); background: #fff; color: var(--gray-700); cursor: pointer; }
.chip:hover { border-color: var(--color-blue-600); color: var(--color-blue-600); }
.chip.is-on { background: var(--color-blue-600); border-color: var(--color-blue-600); color: #fff; }
.cat-card { cursor: pointer; transition: box-shadow .2s, border-color .2s; }
.cat-card:hover { border-color: var(--color-blue-300); box-shadow: var(--shadow-sm); }
.cat-card.is-on { border-color: var(--color-blue-600); box-shadow: 0 0 0 1px var(--color-blue-600); }
.cat-card .cat-rows { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cat-card .cat-rows li { display: flex; justify-content: space-between; gap: var(--sp-2); padding: 6px 0; border-top: 1px solid var(--gray-100); }
.cat-card .cat-rows li.is-inactive { color: var(--gray-500); }
.table tr.is-new td { background: var(--color-blue-50); }
.table tr.is-click { cursor: pointer; }
.table tr.is-click:hover td { background: var(--gray-50); }
.table tr.is-selected td { background: var(--color-blue-50); }
.assumption { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--amber-800); background: var(--amber-50); border: 1px solid var(--amber-200); border-radius: var(--radius-full); padding: 2px 8px; white-space: nowrap; }
.list-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) 150px; gap: var(--sp-4); align-items: center; padding: 12px var(--sp-6); border-bottom: 1px solid var(--gray-100); cursor: pointer; font-size: 14px; }
.list-row:hover { background: var(--gray-50); }
.list-row.is-on { background: var(--color-blue-50); box-shadow: inset 4px 0 0 var(--color-blue-600); }
.list-row--head { cursor: default; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); font-weight: 600; background: var(--gray-50); }
.list-row--head:hover { background: var(--gray-50); }

/* =========================== Kevin Call 05.10. ~20:41: Wizard + RV-Karte =========================== */
.wizard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-6); align-items: start; }
@media (max-width: 1100px) { .wizard-layout { grid-template-columns: 1fr; } }
.wizard-side { position: sticky; top: calc(var(--header-h) + var(--sp-6)); display: flex; flex-direction: column; gap: var(--sp-4); }
.pricing-card { border-radius: var(--radius-2xl); overflow: hidden; background: #fff; }
.pricing-card__head { background: var(--color-blue-600); color: #fff; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; padding: 12px var(--sp-4); }
.pricing-card__body { border: 1px solid var(--color-blue-600); border-top: 0; border-radius: 0 0 var(--radius-2xl) var(--radius-2xl); padding: var(--sp-6); }
.pricing-card__rate { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--gray-900); }
.pricing-card__rate-sub { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.pricing-card__row { display: flex; justify-content: space-between; gap: var(--sp-2); font-size: 14px; padding: 6px 0; border-top: 1px solid var(--gray-100); }
.pricing-card__row:first-of-type { border-top: 0; padding-top: 0; }

/* Grüne Rahmenvertrags-Karte (unter Preiskalkulation, NICHT Alert) – Farbe --color-green / emerald */
.rv-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--emerald-300);
  background: linear-gradient(180deg, #f3fce8 0%, var(--emerald-50) 100%);
  padding: var(--sp-4);
  color: var(--emerald-800);
  box-shadow: var(--shadow-xs);
}
.rv-card__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--emerald-700); display: flex; align-items: center; gap: 6px; }
.rv-card__label::before { content: ''; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-green) 35%, transparent); }
.rv-card__name { font-weight: 700; font-size: 15px; margin-top: 6px; color: var(--gray-900); }
.rv-card__meta { font-size: 12px; color: var(--gray-600); margin-top: 2px; }
.rv-card__rest { margin-top: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.rv-card__rest-label { font-size: 12px; color: var(--emerald-700); font-weight: 600; }
.rv-card__rest-value { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--emerald-800); font-variant-numeric: tabular-nums; }

.choice-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.choice-yesno button {
  font: inherit; text-align: left; padding: var(--sp-4); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300); background: #fff; cursor: pointer; color: var(--gray-900);
}
.choice-yesno button:hover { border-color: var(--color-blue-400); }
.choice-yesno button.is-on { border-color: var(--color-blue-600); box-shadow: 0 0 0 1px var(--color-blue-600); background: var(--color-blue-50); }
.choice-yesno button.is-on-yes { border-color: var(--emerald-600); box-shadow: 0 0 0 1px var(--emerald-600); background: var(--emerald-50); }
.choice-yesno .cy-title { font-weight: 600; display: block; }
.choice-yesno .cy-sub { font-size: 13px; color: var(--gray-500); margin-top: 4px; display: block; }

.rights-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full); }
.rights-pill--write { background: var(--color-blue-100); color: var(--color-blue-800); }
.rights-pill--read { background: var(--emerald-100); color: var(--emerald-800); }
.rv-banner-offer {
  border: 1px solid var(--emerald-300); background: var(--emerald-50); border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-6); color: var(--emerald-800);
}
.rv-banner-offer__title { font-weight: 700; color: var(--gray-900); }

/* ===== Meeting 08.10.2026: Spec-1:1-Stand ===== */
.badge--rv { background: var(--emerald-50); color: var(--emerald-800); border: 1px solid var(--emerald-300); }
.badge--rv::before { content: ''; width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--color-green); margin-right: 2px; }
/* Marker: Widerspruch zwischen Tickets (Pink) / Spec-Lücke (Amber) / Ticket-Herkunft (Grau) */
.tag-wid, .tag-luecke, .tag-ent { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: var(--radius-full); padding: 0 8px; line-height: 18px; white-space: nowrap; margin-left: 4px; vertical-align: 1px; text-decoration: none; cursor: help; }
.tag-wid { color: var(--color-secondary-dark); background: var(--color-pink-50); border: 1px dashed var(--color-pink); }
.tag-luecke { color: var(--amber-800); background: var(--amber-50); border: 1px dashed var(--amber-500); }
.tag-ent { color: var(--emerald-700); background: #ecfdf5; border: 1px solid #6ee7b7; }
.tag-wid:hover, .tag-luecke:hover, .tag-ent:hover { text-decoration: underline; }
.tag-ticket { display: inline-block; font-size: 10px; font-weight: 600; color: var(--gray-600); background: var(--gray-100); border-radius: var(--radius-xs); padding: 0 5px; line-height: 16px; margin-left: 4px; vertical-align: 1px; font-family: var(--font-mono); }
/* Rest-Meter (abgebucht dunkel, reserviert hell) */
.meter--seg span { display: block; height: 100%; }
.meter .m-abg { background: var(--color-blue-600); }
.meter .m-res { background: var(--color-blue-300); }
.legend .l-abg::before { background: var(--color-blue-600); }
.legend .l-res::before { background: var(--color-blue-300); }
.restflow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.restflow .rf-v { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--gray-900); }
.restflow .rf-n { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--emerald-800); }
.use-box { border: 1px solid var(--emerald-300); background: var(--emerald-50); border-radius: var(--radius-lg); padding: 16px; }
.use-box.is-off { border-color: var(--gray-200); background: var(--gray-50); }
.use-box label.cb { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.use-box label.cb input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--emerald-700); }
/* Prototyp-Steuerung (kein Spec-Feature) */
.proto-ctrl { border: 1px dashed var(--gray-400); background: repeating-linear-gradient(135deg, #fafafa, #fafafa 8px, #f3f4f6 8px, #f3f4f6 16px); border-radius: var(--radius-lg); padding: 12px 16px; }
.proto-ctrl__title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-600); margin-bottom: 8px; }
.ro { background: var(--gray-50) !important; color: var(--gray-700); }
.kv-row { display: grid; grid-template-columns: 220px minmax(0,1fr) 150px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--gray-100); }
.kv-row label { font-size: 14px; color: var(--gray-700); }
.kv-row .req::after { content: ' *'; color: var(--red-700); }
.marker-on { background: var(--amber-50); }
/* KW-n: Kevin-Wunsch außerhalb der Spec (Violett, gestrichelt) */
.tag-kw { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: var(--radius-full); padding: 0 8px; line-height: 18px; white-space: nowrap; margin-left: 4px; vertical-align: 1px; text-decoration: none; cursor: help; color: var(--purple-800); background: var(--purple-100); border: 1px dashed #a855f7; }
.tag-kw:hover { text-decoration: underline; }
.dl dd .tag-kw { white-space: normal; }
.budget-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 12px 16px; border: 1px dashed #c4b5fd; background: #faf5ff; border-radius: var(--radius-md, 8px); }
.budget-strip b { color: var(--gray-900); }
/* KW-1: Budget-Dialog kann länger als der Bildschirm werden → Inhalt scrollt, Kopf/Fuß bleiben sichtbar */
#m-budget .modal { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
#m-budget .modal__body { overflow-y: auto; min-height: 0; }

/* ===================================================================
   FV-Detailansicht (09.10.2026) – Ergänzungen
   =================================================================== */
/* Marker: neu durch Zusammenlegung (Blau gestrichelt) / Annahme (Amber, .assumption oben) / Quelle (Grau) */
.tag-neu { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; border-radius: var(--radius-full); padding: 0 8px; line-height: 18px; white-space: nowrap; margin-left: 4px; vertical-align: 1px; color: var(--color-blue-800); background: var(--color-blue-50); border: 1px dashed var(--color-blue-600); cursor: help; }
.tag-src { display: inline-block; font-size: 10px; font-weight: 600; color: var(--gray-600); background: var(--gray-100); border-radius: var(--radius-xs); padding: 0 5px; line-height: 16px; margin-left: 4px; vertical-align: 1px; font-family: var(--font-mono); cursor: help; }
body.hide-src .tag-src { display: none; }
.assumption { cursor: help; }

/* section-headline.html.twig: Icon + Titel */
.section-headline { display: flex; align-items: center; gap: var(--sp-2); color: var(--gray-500); font-size: 14px; font-weight: 500; }
.section-headline svg { width: 20px; height: 20px; color: var(--color-blue-600); }

/* Seitenkopf */
.fv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-6); flex-wrap: wrap; }
.fv-head__title { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fv-head__title h2 { font-size: 24px; line-height: 1.2; font-weight: 700; color: var(--gray-900); margin-right: var(--sp-2); }
.fv-head__sub { font-size: 14px; color: var(--gray-500); margin-top: var(--sp-1); }

/* commission-status-bar als Phasenleiste */
.phasebar-wrap { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--sp-4) var(--sp-6); }
.phasebar-wrap .statusbar .lbl small { display: block; font-size: 12px; font-weight: 400; color: var(--gray-500); }
.statusbar li.is-canceled .dot { background: var(--red-700); color: #fff; }
.statusbar li.is-canceled .lbl { color: var(--red-700); font-weight: 600; }

/* Accordion (content/accordion, Flowbite data-accordion) */
.acc { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.acc + .acc { margin-top: var(--sp-4); }
.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-6); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--gray-50); }
.acc__chev { width: 20px; height: 20px; color: var(--gray-500); transition: transform .2s; flex-shrink: 0; margin-left: auto; }
.acc[open] > summary .acc__chev { transform: rotate(180deg); }
.acc[open] > summary { border-bottom: 1px solid var(--gray-100); }
.acc__title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.acc__sum { font-size: 14px; color: var(--gray-500); }
.acc__body { padding: var(--sp-6); }
.acc__body > * + * { margin-top: var(--sp-6); }
.acc.is-future { background: var(--gray-50); box-shadow: none; border-style: dashed; border-color: var(--gray-300); }
.acc.is-future > summary { cursor: default; }
.acc.is-future .acc__title { color: var(--gray-500); }
.acc.is-current { border-color: var(--color-blue-300); box-shadow: 0 0 0 1px var(--color-blue-300), var(--shadow-xs); }
.phase-num { width: 32px; height: 32px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: var(--gray-200); color: var(--gray-600); flex-shrink: 0; }
.phase-num.is-done { background: var(--emerald-600); color: #fff; }
.phase-num.is-current { background: var(--color-blue-600); color: #fff; }
.phase-num.is-canceled { background: var(--red-700); color: #fff; }
.phase-num svg { width: 16px; height: 16px; }

/* Layout-Raster */
.grid-a { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-8); align-items: start; }
.grid-c { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-8); align-items: start; }
.sticky-col { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
@media (max-width: 1180px) { .grid-a, .grid-c { grid-template-columns: 1fr; } .sticky-col { position: static; } }
.mini-h { font-size: 14px; font-weight: 600; color: var(--gray-900); margin-bottom: var(--sp-2); }

/* activity-log.html.twig: bg-gray-50 Container, Datum-Gruppen, divide-y */
.activity { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--sp-6); }
.activity > * + * { margin-top: var(--sp-6); }
.activity__date { font-size: 18px; font-weight: 600; color: var(--gray-900); }
.activity__list { list-style: none; margin: var(--sp-1) 0 0; padding: 0; }
.activity__list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--gray-200); }
.activity__list li:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; background: var(--color-blue-100); color: var(--color-blue-800); }
.avatar--sys { background: var(--gray-200); color: var(--gray-700); }
.avatar--int { background: var(--color-pink-100); color: var(--color-secondary-dark); }
.activity__text { font-size: 14px; color: var(--gray-600); }
.activity__text b { color: var(--gray-900); font-weight: 500; }
.activity__meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.is-internal { background: var(--color-pink-50); border-radius: var(--radius-md); padding-left: 8px !important; padding-right: 8px !important; }

/* event-log Timeline (Variante C) */
.evlog { list-style: none; margin: 0; padding: 0; position: relative; }
.evlog > li { position: relative; padding: 0 0 var(--sp-6) 56px; }
.evlog > li::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; border-left: 2px solid var(--gray-200); }
.evlog > li:last-child::before { display: none; }
.evlog .ev-icon { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--gray-300); color: var(--gray-600); }
.evlog .ev-icon svg { width: 18px; height: 18px; }
.evlog .ev-icon--blue { border-color: var(--color-blue-600); color: var(--color-blue-600); }
.evlog .ev-icon--green { border-color: var(--emerald-600); color: var(--emerald-700); }
.evlog .ev-icon--amber { border-color: var(--amber-500); color: var(--amber-800); }
.evlog .ev-icon--red { border-color: var(--red-700); color: var(--red-700); }
.evlog .ev-icon--pink { border-color: var(--color-pink); color: var(--color-pink); }
.evlog .ev-icon--next { border-style: dashed; border-color: var(--color-blue-600); color: var(--color-blue-600); background: var(--color-blue-50); }
.ev-card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.ev-card > summary { list-style: none; cursor: pointer; padding: 12px var(--sp-4); display: flex; gap: var(--sp-4); align-items: center; }
.ev-card > summary::-webkit-details-marker { display: none; }
.ev-card > summary:hover { background: var(--gray-50); }
.ev-card.no-detail > summary { cursor: default; }
.ev-card.no-detail > summary:hover { background: transparent; }
.ev-card[open] > summary { border-bottom: 1px solid var(--gray-100); }
.ev-card[open] > summary .acc__chev { transform: rotate(180deg); }
.ev-card__body { padding: var(--sp-4); }
.ev-card__body > * + * { margin-top: var(--sp-4); }
.ev-title { font-weight: 500; color: var(--gray-900); font-size: 15px; }
.ev-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.ev-card.is-internal { background: var(--color-pink-50); border-color: var(--color-pink-200); }
.ev-card.is-next { border: 1px dashed var(--color-blue-600); background: var(--color-blue-50); }

/* Kennzahlen-Kopf (Variante B) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tabs a.is-future { color: var(--gray-400); }
.tabs a.is-future:hover { color: var(--gray-500); }
.tab-empty { text-align: center; color: var(--gray-500); padding: var(--sp-12) var(--sp-6); border: 1px dashed var(--gray-300); border-radius: var(--radius-lg); background: #fff; }
.next-step { border: 1px solid var(--color-blue-300); background: var(--color-blue-50); border-radius: var(--radius-lg); padding: var(--sp-4) var(--sp-6); display: flex; gap: var(--sp-4); align-items: flex-start; }
.next-step svg { width: 24px; height: 24px; color: var(--color-blue-600); flex-shrink: 0; }
.next-step__title { font-weight: 700; color: var(--gray-900); }
.next-step__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-4); }
.sum-tile { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--sp-4) var(--sp-6); }
.sum-tile__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.sum-tile__title { font-weight: 700; }
.sum-tile.is-future { background: var(--gray-50); border-style: dashed; border-color: var(--gray-300); box-shadow: none; color: var(--gray-500); }

/* contact-person-card / address-block */
.cpc { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--sp-4); background: #fff; }
.cpc__name { font-weight: 600; color: var(--gray-900); display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.cpc__line { font-size: 14px; color: var(--gray-600); margin-top: 2px; }
.addr { font-style: normal; font-size: 14px; color: var(--gray-700); line-height: 1.6; }
.addr b { color: var(--gray-900); font-weight: 600; }

/* docusign-status / recipient-card */
.ds-recipient { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; padding: 12px var(--sp-4); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: #fff; }
.ds-recipient + .ds-recipient { margin-top: var(--sp-2); }
.ds-stage { width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--gray-100); color: var(--gray-700); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* print-plan-readonly */
.pp-dev { border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: var(--sp-4); background: #fff; }
.pp-dev + .pp-dev { margin-top: var(--sp-2); }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-2); font-size: 14px; }
.pp-grid .pp-k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); font-weight: 600; }

/* Prototyp-Steuerung (Kopf) */
.proto-ctrl .ctrl-row { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; font-size: 14px; }
.proto-ctrl select { font: inherit; font-size: 14px; padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: var(--radius-md); background: #fff; color: var(--gray-900); }
.proto-ctrl label { display: inline-flex; gap: var(--sp-2); align-items: center; color: var(--gray-700); }
.proto-ctrl .vlinks a { font-weight: 500; }
.proto-ctrl .vlinks a.is-active { color: var(--gray-900); text-decoration: underline; }
.btn--disabled-hint { opacity: .55; }
.dl--tight { gap: 6px var(--sp-4); font-size: 14px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { font-size: 14px; color: var(--gray-500); }
.mt-6 { margin-top: var(--sp-6); }
/* FV: viele Aktionen (z. B. Approval in in_progress) umbrechen statt überlaufen */
.page-actions__inner { flex-wrap: wrap; row-gap: var(--sp-2); }
.page-actions__group { flex-wrap: wrap; row-gap: var(--sp-2); }
.page-actions .btn { white-space: nowrap; }
.app-main.has-actions { padding-bottom: 160px; }
