/*
 * Decision Engine — application stylesheet
 *
 * Plain CSS, no preprocessor, no build. Served by Propshaft.
 * Organized as: design tokens → reset/base → layout primitives → components → utilities.
 *
 * Naming: BEM-lite. Block = `.card`, modifier = `.card--muted`, element = `.card__title`.
 */

/* =====================================================================
 * Design tokens
 * ===================================================================== */

:root {
  /* Brand */
  --color-primary:        #1E40FF;
  --color-primary-hover:  #1730D6;
  --color-primary-soft:   #E6EBFF;

  /* Surfaces */
  --color-bg:             #F5F5F7;
  --color-surface:        #FFFFFF;
  --color-surface-muted:  #F9FAFB;
  --color-border:         #E5E7EB;
  --color-border-strong:  #D1D5DB;
  --color-border-soft:    #F3F4F6;
  --color-bg-subtle:      #F9FAFB;

  /* Text */
  --color-text:           #111827;
  --color-text-muted:     #6B7280;
  --color-text-subtle:    #9CA3AF;
  --color-text-on-primary: #FFFFFF;

  /* Status */
  --color-success:        #10B981;
  --color-success-bg:     #D1FADF;
  --color-warning:        #F59E0B;
  --color-warning-bg:     #FEF3C7;
  --color-danger:         #EF4444;
  --color-danger-bg:      #FEE2E2;
  --color-ai-bg:          #EEF0FF;
  --color-paywall-from:   #F97316;
  --color-paywall-to:     #EA580C;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --lh-tight: 1.2;
  --lh-base:  1.5;
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.10);

  /* Layout */
  --header-height: 64px;
  --page-max-width: 1200px;
}

/* =====================================================================
 * Reset / base
 * ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-3) 0;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}
h1 { font-size: var(--fs-32); }
h2 { font-size: var(--fs-24); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-18); }

p { margin: 0 0 var(--space-3) 0; }

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* =====================================================================
 * App shell layout
 * ===================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}
.app-header__inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
/* Header brand is wrapped in an <a> linking to the dashboard / home page.
   The flex row places the logo to the left of the stacked title + tag. */
.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  line-height: 1.1;
}
.app-header__brand:hover { text-decoration: none; }
.app-header__brand-logo {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.app-header__brand-text {
  display: flex;
  flex-direction: column;
}
.app-header__brand-name {
  font-weight: var(--fw-bold);
  font-size: var(--fs-18);
  color: var(--color-primary);
}
.app-header__brand-tag {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.app-header__nav-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}
.app-header__nav-toggle {
  /* Desktop default: hidden — nav is always visible. */
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  border: none;
  cursor: pointer;
}
.app-header__nav-toggle-icon { font-size: var(--fs-20); line-height: 1; }
.app-header__nav {
  display: flex;
  gap: var(--space-6);
  flex: 1;
  justify-content: center;
}
.app-header__nav-link {
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  padding: var(--space-2) var(--space-1);
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.app-header__nav-link:hover { color: var(--color-text); text-decoration: none; }
.app-header__nav-link--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.app-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  text-decoration: none;
}
.app-header__avatar:hover { text-decoration: none; }

.app-header__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.app-header__signout {
  background: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-14);
  cursor: pointer;
}
.app-header__signout:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.page {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.page__title {
  font-size: var(--fs-24);
  margin-bottom: var(--space-6);
}
.page__section-title {
  font-size: var(--fs-16);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
  margin: var(--space-6) 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

/* Tab strip — wraps a row of tabs over a single visible panel. Used on the
   Dashboard to demote charts + simulator + KI behind one click. */
.tab-strip__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-3);
}
.tab-strip__tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
  margin-bottom: -1px;
}
.tab-strip__tab:hover {
  color: var(--color-text);
  background: var(--color-surface-muted);
}
.tab-strip__tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.tab-strip__tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: transparent;
}
.tab-strip__tab--active:hover {
  background: transparent;
  color: var(--color-primary);
}

/* Inline edit row for Monatliche Performance. Lives inside a colspan td and
   must NOT exceed the table's natural width — uses fluid auto-fit grid that
   wraps fields to a new line instead of stretching the column. */
.mp-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}
.mp-edit__header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: baseline;
  font-size: var(--fs-14);
}
/* Use minmax(0, 1fr) so the grid never demands more width than its container —
   important because we're inside a colspan td in an auto-layout table that
   would otherwise grow to fit our content and push the whole table wider.
   3 cols × 2 rows for the 6 inputs (Forecast, Real, Retouren, Erstattungen,
   Units, Retouren-Grund) keeps each field wide enough to be readable. */
.mp-edit__fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}
.mp-edit__field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
@media (max-width: 720px) {
  .mp-edit__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mp-edit__field input,
.mp-edit__field select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  min-width: 0;
}
.mp-edit__field input:focus,
.mp-edit__field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.mp-edit__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* Compact period picker (month + year) shown above Business Report dropzones.
   The Business Report CSV has no date columns, so the seller picks the
   month here before dropping the file. PPC + Settlement get their period
   from the file contents and can ignore this. */
.report-period {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  font-size: var(--fs-14);
}
.report-period__label { color: var(--color-text-muted); }
.report-period__select {
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

/* Inline PPC scope picker that appears below the Operations upload zone
   when a multi-portfolio Sponsored-Products report needs scoping. */
.ppc-scope-picker {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.ppc-scope-picker h4 { margin: 0 0 var(--space-1) 0; }
.ppc-scope-picker__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.ppc-scope-picker__actions form { margin: 0; display: inline; }

/* Compact "+ Älteren Monat hinzufügen" disclosure below the Monatliche
   Performance table. Tight inline form, narrow selects, muted summary. */
.historical-month__summary {
  display: inline-block;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--fs-14);
  padding: var(--space-1) 0;
}
.historical-month__summary:hover {
  color: var(--color-text);
}
.historical-month__body {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  max-width: 560px;
}
.historical-month__hint {
  font-size: var(--fs-12);
  margin: 0 0 var(--space-3) 0;
}
.historical-month__form {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
}
.historical-month__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.historical-month__select {
  width: auto;
  min-width: 110px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
}
.historical-month__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.breadcrumb {
  font-size: var(--fs-14);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb__separator { margin: 0 var(--space-2); color: var(--color-text-subtle); }

/* =====================================================================
 * Modal-card layout (onboarding + auth)
 * ===================================================================== */

.modal-shell {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-12) var(--space-6);
}
.modal-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-10) var(--space-8);
  width: 100%;
  max-width: 560px;
  text-align: center;
}
/* Nordstern logo above the brand text on the logged-out landing page. */
.modal-card__logo {
  display: block;
  margin: 0 auto var(--space-4);
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.modal-card__brand {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}
.modal-card__brand-tag {
  font-size: var(--fs-14);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}
.modal-card__title {
  margin-bottom: var(--space-3);
}
.modal-card__lead {
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}
.modal-card__cta {
  margin-bottom: var(--space-3);
}
.modal-card__hint {
  font-size: var(--fs-14);
  color: var(--color-text-muted);
}

/* =====================================================================
 * Cards
 * ===================================================================== */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}
.card--ai {
  background: var(--color-ai-bg);
  border-color: transparent;
}
.card__title {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card__subtitle {
  font-size: var(--fs-14);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* =====================================================================
 * Buttons
 * ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  font-weight: var(--fw-medium);
  font-size: var(--fs-14);
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn--primary:hover { background: var(--color-primary-hover); color: var(--color-text-on-primary); }

.btn--secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn--secondary:hover { background: var(--color-surface-muted); }

.btn--ghost {
  color: var(--color-text-muted);
}
.btn--ghost:hover { color: var(--color-text); background: var(--color-surface-muted); }

.btn--block { width: 100%; }

.btn[disabled],
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =====================================================================
 * Badges + pills
 * ===================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }

/* =====================================================================
 * Forms
 * ===================================================================== */

.form-field {
  margin-bottom: var(--space-4);
  text-align: left;
}
.form-field__label {
  display: block;
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}
.form-field__help {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="datetime-local"],
.form-field input[type="month"],
.form-field input[type="time"],
.form-field input[type="search"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  /* Match height across input types — date pickers otherwise render shorter
     than their text-input siblings on Chrome/Safari. */
  line-height: 1.4;
  font-family: inherit;
  font-size: inherit;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

/* =====================================================================
 * Flash messages
 * ===================================================================== */

.flash {
  max-width: var(--page-max-width);
  margin: var(--space-4) auto 0 auto;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-14);
}
.flash-notice { background: var(--color-success-bg); color: var(--color-success); }
.flash-alert  { background: var(--color-danger-bg);  color: var(--color-danger); }
.flash + .flash { margin-top: var(--space-2); }

/* =====================================================================
 * Utilities (use sparingly)
 * ===================================================================== */

.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.stack-2 > * + * { margin-top: var(--space-2); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-6 > * + * { margin-top: var(--space-6); }

/* =====================================================================
 * Admin sub-navigation + data tables
 * ===================================================================== */

.admin-subnav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.admin-subnav__inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--fs-14);
}
.admin-subnav__label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--fs-12);
  color: var(--color-text-subtle);
  font-weight: var(--fw-semibold);
}
.admin-subnav__link {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.admin-subnav__link:hover { color: var(--color-text); background: var(--color-surface-muted); text-decoration: none; }
.admin-subnav__link--active { color: var(--color-primary); background: var(--color-primary-soft); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.kpi-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.kpi-tile__label {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.kpi-tile__value {
  font-size: var(--fs-32);
  font-weight: var(--fw-bold);
  line-height: 1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table th {
  text-align: left;
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-surface-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-14);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.is-historic td { color: var(--color-text-muted); }
.data-table__actions { display: flex; gap: var(--space-2); justify-content: flex-end; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
}
.page-header__title { margin: 0; }
.page-header__actions { display: flex; gap: var(--space-2); }

/* =====================================================================
 * Onboarding flow
 * ===================================================================== */

.onboarding-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.onboarding-steps__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-border-strong);
}
.onboarding-steps__dot--active { background: var(--color-primary); }
.onboarding-steps__dot--done   { background: var(--color-primary); opacity: 0.5; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.choice-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.choice-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.choice-card--selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.choice-card--disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.choice-card__icon { font-size: var(--fs-24); margin-bottom: var(--space-3); }
.choice-card__title { font-size: var(--fs-16); font-weight: var(--fw-semibold); margin-bottom: var(--space-2); }
.choice-card__body { font-size: var(--fs-14); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.choice-card__example { font-size: var(--fs-12); font-style: italic; color: var(--color-text-subtle); }

.modal-card--wide { max-width: 760px; text-align: left; }

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
}

.dropzone {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
/* Clickable + drag-and-drop variant. The whole zone is the hit target —
   the underlying <input type="file"> is hidden via .dropzone__input. */
.dropzone--interactive {
  cursor: pointer;
}
.dropzone--interactive:hover,
.dropzone--hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
/* Visually hidden but still focusable for keyboard a11y. */
.dropzone__input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.amazon-sync-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.amazon-sync-panel__actions { flex-shrink: 0; }
.amazon-sync-panel__form { margin-top: var(--space-3); }

.amazon-sync-panel__history { margin-top: var(--space-4); }
.amazon-sync-panel__history-title {
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.amazon-sync-panel__history-list { list-style: none; padding: 0; margin: 0; }
.amazon-sync-panel__history-list li {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-14);
}
.amazon-sync-panel__history-list li:last-child { border-bottom: 0; }
.amazon-sync-panel__history-name { color: var(--color-text); }
.amazon-sync-panel__history-type { color: var(--color-text-muted); font-size: var(--fs-12); }

.cashflow-forecast__pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.cashflow-forecast__pill {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  text-align: center;
}
.cashflow-forecast__pill--knapp   { background: var(--color-warning-bg); border-color: var(--color-warning); }
.cashflow-forecast__pill--negativ { background: var(--color-danger-bg);  border-color: var(--color-danger); }
.cashflow-forecast__pill-period {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cashflow-forecast__pill-balance {
  font-weight: var(--fw-medium);
  font-size: var(--fs-16);
  font-variant-numeric: tabular-nums;
  margin: var(--space-1) 0;
}

.data-table__row--editing { background: var(--color-bg-subtle); }
.data-table__row--editing td { padding: var(--space-3); }

.recommendations-list { list-style: none; padding: 0; margin: var(--space-3) 0 0 0; }
.recommendation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border);
  background: var(--color-bg-subtle);
  margin-bottom: var(--space-2);
}
.recommendation--critical { border-left-color: var(--color-danger);  background: var(--color-danger-bg); }
.recommendation--warning  { border-left-color: var(--color-warning); background: var(--color-warning-bg); }
.recommendation--info     { border-left-color: var(--color-primary); }
.recommendation__indicator { font-size: var(--fs-20); }
.recommendation__body { display: flex; flex-direction: column; gap: var(--space-2); }
.recommendation__message { line-height: 1.4; }

.next-steps__list { list-style: none; padding: 0; margin: var(--space-3) 0 0 0; }
.next-steps__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.next-steps__item:last-child { border-bottom: 0; }
.next-steps__item--done .next-steps__label { color: var(--color-text-muted); }
.next-steps__check { font-size: var(--fs-20); }
.next-steps__label.strike { text-decoration: line-through; }

.cashflow-stress {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.cashflow-stress__title { font-size: var(--fs-14); margin: 0 0 var(--space-2) 0; }
.cashflow-stress__grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-4);
  align-items: center;
}
.cashflow-stress__grid label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.cashflow-stress__grid label > span { grid-column: 1 / span 2; }
.cashflow-stress__grid input[type="range"] { width: 100%; }
.cashflow-stress__grid output {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-medium);
  color: var(--color-text);
  min-width: 4ch;
  text-align: right;
}
.dropzone--success { border-color: var(--color-success); background: var(--color-success-bg); }
.dropzone--error   { border-color: var(--color-danger);  background: var(--color-danger-bg); }
.dropzone--pending { border-color: var(--color-primary);  background: var(--color-primary-soft); }

.portfolio-picker {
  margin-top: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  max-height: 240px;
  overflow-y: auto;
}
.portfolio-picker__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-14);
  cursor: pointer;
}
.portfolio-picker__row:last-child { border-bottom: 0; }
.portfolio-picker__row:hover { background: var(--color-bg-subtle); }
.portfolio-picker__name  { color: var(--color-text); }
.portfolio-picker__spend { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.dropzone__icon  { font-size: var(--fs-32); color: var(--color-text-subtle); }
.dropzone__check { font-size: var(--fs-32); color: var(--color-success); }
.dropzone__label { font-weight: var(--fw-medium); margin-top: var(--space-2); }
.dropzone__hint  { font-size: var(--fs-12); color: var(--color-text-muted); margin-top: var(--space-1); }
/* Legacy native-file-input fallback for any dropzone that doesn't use the
   Stimulus controller yet. New code should add .dropzone__input to hide it. */
.dropzone input[type="file"]:not(.dropzone__input) {
  display: block; margin: var(--space-3) auto 0;
}

.report-tip {
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-14);
  margin: var(--space-4) 0;
  text-align: center;
}

/* =====================================================================
 * Financial Input (Sprint 3)
 * ===================================================================== */

.financial-layout {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-6);
  align-items: start;
}
.financial-layout__main { min-width: 0; }
.financial-layout__panel { position: sticky; top: calc(var(--header-height) + var(--space-4)); }

.financial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-5);
  /* Top-anchor so labels line up across cells. Cells with help-text below
     the input extend further down; cells without dangle empty space at the
     bottom (acceptable — labels matching is the higher priority). Forms
     with intentional 2-line labels can opt into bottom-anchor with the
     `.financial-grid--bottom` modifier. */
  align-items: start;
}

/* FI-spec v2: Live Size-Tier + Fee preview shown directly below the
   Maße & Gewicht inputs. Updates as the seller adjusts dimensions. */
.tier-preview {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.tier-preview__badge {
  font-size: var(--fs-14);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}
.tier-preview__rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  margin: 0;
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.tier-preview__rows > div { display: flex; justify-content: space-between; }
.tier-preview__rows dt { margin: 0; }
.tier-preview__rows dd { margin: 0; color: var(--color-text); }

/* FI-spec v2: Auto/Manuell badges + reset button on per-fee inputs. */
.fee-field { position: relative; }
.fee-field--auto    { background: var(--color-surface-muted); border-radius: var(--radius-sm); padding: var(--space-2); margin: calc(-1 * var(--space-2)); }
.fee-field__badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--color-border);
  color: var(--color-text-muted);
}
.fee-field--manual .fee-field__badge {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.fee-field__reset {
  margin-top: var(--space-1);
  font-size: var(--fs-12);
  color: var(--color-primary);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.fee-field__reset:hover { text-decoration: underline; }
.financial-grid--bottom { align-items: end; }
.financial-grid .form-field { margin-bottom: 0; }

.auto-row {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-size: var(--fs-14);
  color: var(--color-text-muted);
}
.auto-row strong { color: var(--color-text); }
.auto-row__highlight {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
}
.auto-row__highlight--positive { background: var(--color-success-bg); color: var(--color-success); }
.auto-row__highlight--positive strong { color: var(--color-success); }
.auto-row__highlight--negative { background: var(--color-danger-bg);  color: var(--color-danger); }
.auto-row__highlight--negative strong { color: var(--color-danger); }

.financial-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  position: sticky;
  bottom: 0;
}

input[readonly] {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

/* Live Calculation panel */
.live-calc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  font-size: var(--fs-14);
}
.live-calc__title {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
}
.live-calc__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-1) 0;
}
.live-calc__row--minus { color: var(--color-text-muted); }
.live-calc__row--total { font-weight: var(--fw-semibold); padding-top: var(--space-2); }
.live-calc__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2) 0;
}
.live-calc__hero {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  text-align: center;
}
.live-calc__hero--positive { background: var(--color-success-bg); }
.live-calc__hero--negative { background: var(--color-danger-bg); }
.live-calc__hero-label {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.live-calc__hero-value {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
}
.live-calc__hero--positive .live-calc__hero-value { color: var(--color-success); }
.live-calc__hero--negative .live-calc__hero-value { color: var(--color-danger); }

@media (max-width: 900px) {
  .financial-layout { grid-template-columns: 1fr; }
  .financial-layout__panel { position: static; }
  .financial-grid { grid-template-columns: 1fr; }
}

/* Events feed row (Operations §5.3) */
.event-row {
  display: grid;
  grid-template-columns: 4px 1fr auto auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.event-row__bar {
  align-self: stretch;
  border-radius: var(--radius-sm);
}
.event-row--positive .event-row__bar { background: var(--color-success); }
.event-row--negative .event-row__bar { background: var(--color-danger); }
.event-row__title { font-weight: var(--fw-medium); }
.event-row__meta { font-size: var(--fs-12); color: var(--color-text-muted); }
.event-row__amount { font-weight: var(--fw-semibold); }
.event-row--positive .event-row__amount { color: var(--color-success); }
.event-row--negative .event-row__amount { color: var(--color-danger); }

/* ── Dashboard (Sprint 5 Slice A) ───────────────────────────── */

.banner--onboarding {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-soft);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.kpi-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}
.kpi-bar--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1300px) {
  .kpi-bar--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .kpi-bar--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi-tile__extra {
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.kpi-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.kpi-tile__label { font-size: var(--fs-12); color: var(--color-text-muted); font-weight: var(--fw-medium); }
.kpi-tile__value { font-size: var(--fs-24); font-weight: var(--fw-semibold); margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi-tile__sparkline { display: block; margin-top: var(--space-2); }
.kpi-tile__sub   { font-size: var(--fs-12); margin-top: var(--space-1); }

/* S4 state-card variants (PO 2026-05-29, restyled 2026-05-29).
   Icon-in-circle on the left + label/value/sub stacked + sparkline at
   the bottom. No top accent — colour lives in the icon + value. */
.kpi-bar--state .kpi-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kpi-tile--state { border: 1px solid var(--color-border); }
.kpi-tile__head {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-3);
  align-items: start;
}
.kpi-tile__icon {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}
.kpi-tile__icon--green  { background: #D1FADF; color: #047857; }
.kpi-tile__icon--orange { background: #FEF3C7; color: #B45309; }
.kpi-tile__icon--blue   { background: #E6EBFF; color: #1E40FF; }
.kpi-tile__icon--red    { background: #FEE2E2; color: #B91C1C; }
.kpi-tile__icon--violet { background: #EDE9FE; color: #6D28D9; }
.kpi-tile__icon--muted  { background: var(--color-surface-muted); color: var(--color-text-subtle); }

.kpi-tile__head-text { min-width: 0; overflow: hidden; }
/* Long German labels (Gesundheitsstatus, Kapital gebunden) must wrap inside
   the 6-column bar instead of overflowing. Also tighten letter-spacing —
   the inherited 0.05em pushes "GESUNDHEITSSTATUS" past the box edge. */
.kpi-bar--6 .kpi-tile__label {
  letter-spacing: 0.02em;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
  margin-bottom: 0;
}
.kpi-bar--6 .kpi-tile__value { font-size: var(--fs-20); }
.kpi-bar--6 .kpi-tile { padding: var(--space-3); }
.kpi-tile__value--green  { color: #047857; }
.kpi-tile__value--orange { color: #B45309; }
.kpi-tile__value--blue   { color: #1E40FF; }
.kpi-tile__value--red    { color: #B91C1C; }
.kpi-tile__value--violet { color: #6D28D9; }
.kpi-tile__value--muted  { color: var(--color-text-muted); font-size: var(--fs-16); }

.kpi-tile__sub-extra { margin-top: 2px; font-size: var(--fs-12); }

.kpi-bar__footer {
  display: flex;
  justify-content: flex-end;
  margin: calc(var(--space-3) * -1) 0 var(--space-4);
}
.kpi-bar__footer-link {
  font-size: var(--fs-12);
  color: var(--color-primary);
  text-decoration: none;
}
.kpi-bar__footer-link:hover { text-decoration: underline; }

/* ── S4 B2: 3-column block ─────────────────────────────────────────── */
.dashboard-b2 {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1fr;
  gap: var(--space-3);
  align-items: stretch;
}
.dashboard-b2 > * { min-width: 0; }
@media (max-width: 1200px) {
  .dashboard-b2 { grid-template-columns: 1fr 1fr; }
  .dashboard-b2 > :nth-child(3) { grid-column: span 2; }
}
@media (max-width: 800px) {
  .dashboard-b2 { grid-template-columns: 1fr; }
  .dashboard-b2 > :nth-child(3) { grid-column: span 1; }
}

/* ── Reality Check (S4 B2) ───────────────────────────────────────────── */
.reality-check__head {
  display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}
.reality-check__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1 1 auto;
}
.reality-check__legend {
  display: inline-flex; gap: var(--space-2); align-items: center;
  font-size: var(--fs-12);
}
.reality-check__legend-chip {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-text-muted);
}
.reality-check__legend-chip::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
}
.reality-check__legend-chip--forecast::before  { background: #1E40FF; }
.reality-check__legend-chip--real::before      { background: #10B981; }
.reality-check__legend-chip--deviation::before { background: transparent; border: 1.5px solid #EF4444; }

.reality-check__metric { margin-left: auto; }
.reality-check__select {
  padding: 6px var(--space-2);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-12);
}

.reality-check__range {
  display: inline-flex;
  background: var(--color-surface-muted);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
  margin-bottom: var(--space-3);
}
.reality-check__range-btn {
  background: transparent;
  border: 0;
  padding: 6px var(--space-3);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  cursor: pointer;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
}
.reality-check__range-btn.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.chart-wrap--reality { height: 240px; }
/* Sprint 4 — full-width Reality Check: roomier chart so range scans are easier. */
.dashboard-reality .chart-wrap--reality { height: 320px; }

.reality-check__banner {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-12);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary-soft);
  color: var(--color-text);
}
.reality-check__banner-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 999px;
  background: var(--color-primary); color: var(--color-text-on-primary);
  font-size: 11px;
  flex-shrink: 0;
}
.reality-check__banner-cta { margin-left: auto; flex-shrink: 0; }
.reality-check__banner--negative {
  background: rgba(239, 68, 68, 0.08);
}
.reality-check__banner--negative .reality-check__banner-icon { background: var(--color-danger); }
.reality-check__banner--positive {
  background: rgba(16, 185, 129, 0.10);
}
.reality-check__banner--positive .reality-check__banner-icon { background: var(--color-success); }

/* ── KI Insights teaser (S4 B2 right + B6 tab) ────────────────────────── */
.ki-insights-teaser__head {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.ki-insights-teaser__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: var(--space-2);
}
.ki-insights-teaser__badge {
  text-transform: none;
  letter-spacing: 0;
  font-size: 10px;
}

.ki-insight-teaser-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
/* Sprint 4 — KI-Insights as full-width standalone block: 3 cards across. */
.dashboard-ki .ki-insight-teaser-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}
@media (max-width: 900px) {
  .dashboard-ki .ki-insight-teaser-grid { grid-template-columns: 1fr; }
}
.ki-insight-card {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border);
  background: var(--color-surface-muted);
}
.ki-insight-card__head {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-1);
}
.ki-insight-card__pill {
  width: 24px; height: 24px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.ki-insight-card__title { font-weight: var(--fw-semibold); font-size: var(--fs-14); }
.ki-insight-card__body  { font-size: var(--fs-12); color: var(--color-text); margin: 0 0 var(--space-2); }
.ki-insight-card__cta   { font-size: var(--fs-12); color: var(--color-primary); font-weight: var(--fw-medium); }

.ki-insight-card--risk  { border-left-color: #EF4444; background: #FEF2F2; }
.ki-insight-card--risk  .ki-insight-card__pill { background: #FEE2E2; color: #B91C1C; }
.ki-insight-card--lever { border-left-color: #F59E0B; background: #FFFBEB; }
.ki-insight-card--lever .ki-insight-card__pill { background: #FEF3C7; color: #B45309; }
.ki-insight-card--top   { border-left-color: #10B981; background: #ECFDF5; }
.ki-insight-card--top   .ki-insight-card__pill { background: #D1FADF; color: #047857; }

/* ── Heute Wichtig (S4 B2 left) ──────────────────────────────────────── */
.heute-wichtig { display: flex; flex-direction: column; }
.heute-wichtig__header {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.heute-wichtig__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.heute-wichtig__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
}

.heute-wichtig__list {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.heute-wichtig__card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border);
  background: var(--color-surface-muted);
}
.heute-wichtig__card--red    { border-left-color: #EF4444; background: #FEF2F2; }
.heute-wichtig__card--orange { border-left-color: #F59E0B; background: #FFFBEB; }
.heute-wichtig__card--blue   { border-left-color: #1E40FF; background: #EEF2FF; }

.heute-wichtig__icon {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.heute-wichtig__icon--red    { background: #FEE2E2; }
.heute-wichtig__icon--orange { background: #FEF3C7; }
.heute-wichtig__icon--blue   { background: #DBE3FF; }

.heute-wichtig__body { min-width: 0; }
.heute-wichtig__title-line {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-14);
}
.heute-wichtig__sub-line {
  font-size: var(--fs-12);
  margin-top: 2px;
  line-height: 1.35;
}
.heute-wichtig__cta-row {
  display: flex; align-items: center; gap: var(--space-1);
  margin-top: var(--space-2);
}
.heute-wichtig__menu { position: relative; }
.heute-wichtig__menu summary {
  list-style: none; cursor: pointer; padding: 0 6px;
  color: var(--color-text-muted); font-size: var(--fs-16);
}
.heute-wichtig__menu summary::-webkit-details-marker { display: none; }
.heute-wichtig__menu-items {
  position: absolute; right: 0; top: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: var(--space-1);
  z-index: 10;
  min-width: 160px;
}
.heute-wichtig__toggle {
  display: block;
  margin-top: var(--space-3);
  padding: var(--space-2) 0;
  background: none; border: 0;
  color: var(--color-primary);
  font-size: var(--fs-12);
  cursor: pointer;
  text-align: left;
}
.heute-wichtig__toggle:hover { text-decoration: underline; }

/* ── S4 B3: Product table + Inventory Pressure side-by-side ─────────── */
.dashboard-b3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-3);
  align-items: start;
}
@media (max-width: 1100px) {
  .dashboard-b3 { grid-template-columns: 1fr; }
}

.product-table-wrap { overflow-x: auto; }
.product-table { font-size: var(--fs-12); width: 100%; border-collapse: collapse; }
.product-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  text-align: left;
  padding: var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.product-table th.t-right { text-align: right; }
.product-table__th-sub { font-weight: 400; color: var(--color-text-subtle); }
.product-table td {
  vertical-align: middle;
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.product-table tr:last-child td { border-bottom: 0; }
.product-table .tabular { font-variant-numeric: tabular-nums; }
.product-table .t-right { text-align: right; }

.product-table__name-cell { min-width: 140px; }
.product-table__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-14);
  line-height: 1.2;
}
.product-table__asin {
  font-size: 10px;
  color: var(--color-text-subtle);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-1);
}
.product-table__status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.product-table__variant-badge {
  font-size: 10px;
  margin-left: var(--space-1);
}
.product-table__trend { font-size: 11px; margin-top: 2px; }
.product-table__stock-sub { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.product-table__stock-bar {
  margin-top: var(--space-1);
  height: 4px;
  background: var(--color-surface-muted);
  border-radius: 999px;
  overflow: hidden;
  max-width: 120px;
}
.product-table__stock-bar-fill { height: 100%; }
.product-table__actions {
  white-space: nowrap;
  display: flex;
  gap: var(--space-1);
  justify-content: flex-end;
}
.product-table__action-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.product-table__action-link:hover { background: var(--color-surface-muted); color: var(--color-text); }

/* v1.3 §2.2 — Cashflow-Monatskacheln als eigenständiges Widget. */
.cashflow-tiles-widget {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.cashflow-tiles-widget__lead {
  margin: 4px 0 var(--space-3);
  max-width: 720px;
  font-size: var(--fs-12);
}

/* v1.2 §2 — Cashflow-Monatskacheln (S4 NEW). */
.cashflow-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
}

.cashflow-tile-wrap { position: relative; }
@media (max-width: 720px) {
  .cashflow-tiles { grid-template-columns: 1fr; }
}
.cashflow-tile {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 120ms ease, background 120ms ease;
}
.cashflow-tile:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
}
.cashflow-tile--current { border-color: var(--color-primary-soft); }
.cashflow-tile--selected {
  border-color: var(--color-primary);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(30, 64, 255, 0.10);
}
.cashflow-tile__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.cashflow-tile__period { font-weight: var(--fw-medium); }
.cashflow-tile__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--fs-12);
}
.cashflow-tile__label { color: var(--color-text-muted); }
.cashflow-tile__value { font-weight: var(--fw-semibold); }
.cashflow-tile__value--in  { color: var(--color-success); }
.cashflow-tile__value--out { color: var(--color-danger); }
.cashflow-tile__warn { margin-left: 4px; cursor: help; }
.cashflow-tile__trend {
  font-size: 11px;
  margin-top: 2px;
  border-top: 1px dashed var(--color-border);
  padding-top: 4px;
}

/* v1.3 §2.4 — Cashflow-Monatskachel-Popover (Kategorie-Aufschlüsselung). */
.cashflow-tile-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  padding: var(--space-3);
  font-size: var(--fs-12);
}
.cashflow-tile-popover[hidden] { display: none; }
.cashflow-tile-popover__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-2);
}
.cashflow-tile-popover__close {
  background: none; border: 0; cursor: pointer;
  font-size: var(--fs-16); line-height: 1;
  color: var(--color-text-muted);
  padding: 0 4px;
}
.cashflow-tile-popover__close:hover { color: var(--color-text); }
.cashflow-tile-popover__categories { list-style: none; padding: 0; margin: 0; }
.cashflow-tile-popover__row {
  display: flex; justify-content: space-between; gap: var(--space-2);
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
}
.cashflow-tile-popover__row:first-child { border-top: 0; }
.cashflow-tile-popover__label { flex: 1 1 auto; min-width: 0; }
.cashflow-tile-popover__source {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.cashflow-tile-popover__source--warn { color: var(--color-danger); font-weight: var(--fw-medium); }
.cashflow-tile-popover__amount {
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cashflow-tile-popover__empty { padding: var(--space-2) 0; }
.cashflow-tile-popover__foot {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
  font-size: 11px;
}

/* v1.2 §3 — Event-Timeline Collapse-Header. */
.event-timeline-card__head {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.event-timeline-card__head:hover { color: var(--color-primary); }
.event-timeline-card__chevron {
  font-size: var(--fs-16);
  color: var(--color-text-muted);
}

/* v1.1 §2.6 — Lagerbestand Zusatzzeile (Pipeline-Tage). */
.product-status-block__pipeline {
  font-size: 11px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--color-border);
  cursor: help;
}
.product-status-block__pipeline strong { font-variant-numeric: tabular-nums; }
.product-status-block__pipeline-note {
  display: inline-block;
  margin-left: 4px;
  color: var(--color-warning);
  font-style: italic;
}

/* v1.1 §1 — Settlement period-open marker. */
.settlement-marker {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #FEF3C7;
  color: #B45309;
  border-radius: 999px;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  vertical-align: middle;
}
.cashflow-forecast__settlement-note {
  margin: 4px 0 0;
  padding: 6px var(--space-2);
  background: #FFFBEB;
  border-left: 3px solid var(--color-warning);
  color: #92400E;
  font-size: var(--fs-12);
  border-radius: var(--radius-sm);
}

/* v1.1 §3 — Zone 3.5 Cash Runway / Gebundenes Kapital. */
.cash-runway { padding: var(--space-4); margin-bottom: var(--space-4); }
.cash-runway__head { margin-bottom: var(--space-3); }
.cash-runway__hero {
  font-size: var(--fs-14);
  margin: 4px 0 0;
}
.cash-runway__body {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}
@media (max-width: 900px) {
  .cash-runway__body { grid-template-columns: 1fr; }
}
.cash-runway__buckets { list-style: none; padding: 0; margin: 0; }
.cash-runway__bucket {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: var(--space-2);
  padding: 8px 0;
  border-top: 1px solid var(--color-border);
  align-items: center;
}
.cash-runway__bucket:first-child { border-top: 0; padding-top: 0; }
.cash-runway__bucket-dot { width: 14px; height: 14px; border-radius: 999px; }
.cash-runway__bucket-label { font-weight: var(--fw-medium); font-size: var(--fs-14); }
.cash-runway__bucket-detail { font-size: 11px; margin-top: 2px; }
.cash-runway__bucket-amount {
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
}

.cash-runway__chart { display: flex; flex-direction: column; gap: var(--space-2); }
.cash-runway__chart-head {
  display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline;
  font-size: var(--fs-12);
}
.cash-runway__chart-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.cash-runway__chart-delta { font-weight: var(--fw-semibold); }
.cash-runway__chart-avg { margin-left: auto; }
.chart-wrap--cash-runway { height: 200px; }

.cash-runway__footer { margin-top: var(--space-3); text-align: right; }

/* PO Bug 2 — ASIN/SKU inline-edit rows on the Produktstatus-Block. */
.product-status-block__identifiers {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  align-items: center;
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}
.product-status-block__identifier {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-12);
}
.product-status-block__identifier[hidden] { display: none; }
.product-status-block__identifier-label { color: var(--color-text-muted); }
.product-status-block__identifier-value { font-weight: var(--fw-medium); font-variant-numeric: tabular-nums; }
.product-status-block__identifier-edit {
  background: none; border: 0; cursor: pointer;
  color: var(--color-text-muted);
  font-size: var(--fs-14);
  padding: 0 4px;
  line-height: 1;
}
.product-status-block__identifier-edit:hover { color: var(--color-primary); }
.product-status-block__identifier-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  width: 100%;
  align-items: end;
}
.product-status-block__identifier-form[hidden] { display: none; }
.product-status-block__identifier-form input { padding: 6px 8px; font-size: var(--fs-14); }
.product-status-block__identifier-actions {
  grid-column: 1 / -1;
  display: flex; gap: var(--space-2);
}

/* Sprint 3.1 — Produktstatus-Block on Operations. */
.product-status-block { margin-bottom: var(--space-4); }
.product-status-block__head { margin-bottom: var(--space-3); }
.product-status-block__body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-4);
  align-items: stretch;
}
@media (max-width: 900px) {
  .product-status-block__body { grid-template-columns: 1fr; }
}
.product-status-block__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}
.product-status-block__stat {
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.product-status-block__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}
.product-status-block__value {
  font-size: var(--fs-20);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.product-status-block__unit { font-size: var(--fs-12); font-weight: 400; color: var(--color-text-muted); }
.product-status-block__sub { font-size: 11px; margin-top: var(--space-1); }
.product-status-block__pill {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  padding: 2px 8px;
  border-radius: 999px;
}
.product-status-block__pill--green  { background: #D1FADF; color: #047857; }
.product-status-block__pill--orange { background: #FEF3C7; color: #B45309; }
.product-status-block__pill--red    { background: #FEE2E2; color: #B91C1C; }
.product-status-block__pill--muted  { background: var(--color-border); color: var(--color-text-muted); }
.product-status-block__chart { display: flex; flex-direction: column; }
.product-status-block__chart-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-1);
}
.chart-wrap--mini { height: 120px; }

/* Sprint 3.2 — Operations group sections. */
.ops-group { margin-bottom: var(--space-5); }
.ops-group__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.ops-group__title {
  margin: 0;
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ops-group__sub { margin: 0; font-size: var(--fs-12); }

/* Sprint 8 — Autopsy-Verdikt card (Phase-2-Vorausbau). */
.autopsy-card { border-left: 4px solid var(--color-border); }
.autopsy-card--green  { border-left-color: var(--color-success); background: rgba(16, 185, 129, 0.04); }
.autopsy-card--yellow { border-left-color: var(--color-warning); background: rgba(245, 158, 11, 0.04); }
.autopsy-card--orange { border-left-color: #F97316;            background: rgba(249, 115, 22, 0.04); }
.autopsy-card--red    { border-left-color: var(--color-danger);  background: rgba(239, 68, 68, 0.04); }
.autopsy-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-3); gap: var(--space-3);
}
.autopsy-card__verdict {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px var(--space-3);
  border-radius: 999px;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-14);
}
.autopsy-card__verdict--green  { background: #D1FADF; color: #047857; }
.autopsy-card__verdict--yellow { background: #FEF3C7; color: #B45309; }
.autopsy-card__verdict--orange { background: #FED7AA; color: #9A3412; }
.autopsy-card__verdict--red    { background: #FEE2E2; color: #B91C1C; }
.autopsy-card__reasons { padding-left: var(--space-4); margin: 0; font-size: var(--fs-14); }
.autopsy-card__reasons li { padding: 2px 0; }

/* Sprint 7.1 — Capital Breakdown (Wo ist mein Geld?). */
.capital-breakdown__head { margin-bottom: var(--space-3); }
.capital-breakdown__body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-4);
  align-items: center;
}
@media (max-width: 700px) {
  .capital-breakdown__body { grid-template-columns: 1fr; }
}
.chart-wrap--donut-mini { height: 200px; max-width: 200px; margin: 0 auto; }
.capital-breakdown__list { list-style: none; padding: 0; margin: 0; }
.capital-breakdown__row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: var(--space-2);
  padding: 8px 0;
  border-top: 1px solid var(--color-border);
  align-items: center;
}
.capital-breakdown__row:first-child { border-top: 0; padding-top: 0; }
.capital-breakdown__dot { width: 12px; height: 12px; border-radius: 999px; }
.capital-breakdown__label { font-weight: var(--fw-medium); font-size: var(--fs-14); }
.capital-breakdown__detail { font-size: 11px; }
.capital-breakdown__amount { text-align: right; font-variant-numeric: tabular-nums; }
.capital-breakdown__pct {
  display: block; font-size: 11px; font-weight: 400;
}

/* Sprint 7.2 — Cash Conversion Cycle horizontal flow strip. */
.cash-cycle__head { margin-bottom: var(--space-3); }
.cash-cycle__strip {
  display: flex;
  height: 40px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.cash-cycle__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  min-width: 0;
  text-align: center;
}
.cash-cycle__seg-days { padding: 0 var(--space-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cash-cycle__legend { list-style: none; padding: 0; margin: 0; }
.cash-cycle__legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: var(--space-2);
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
  align-items: center;
}
.cash-cycle__legend-item:first-child { border-top: 0; padding-top: 0; }
.cash-cycle__legend-dot { width: 12px; height: 12px; border-radius: 999px; }
.cash-cycle__legend-label { font-weight: var(--fw-medium); font-size: var(--fs-14); }
.cash-cycle__legend-detail { font-size: 11px; }
.cash-cycle__legend-days { text-align: right; font-variant-numeric: tabular-nums; font-size: var(--fs-12); }

.dashboard-cashflow-engine { align-items: start; }

/* T-L08 — Cashflow Tiefpunkt-Callout (Datum + Betrag direkt sichtbar). */
.cashflow-tiefpunkt {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: var(--space-3) 0 var(--space-1);
  padding: 6px var(--space-3) 4px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  position: relative;
}
.cashflow-tiefpunkt--danger  { border-color: var(--color-danger);  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10); }
.cashflow-tiefpunkt--warning { border-color: var(--color-warning); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.10); }
.cashflow-tiefpunkt__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.cashflow-tiefpunkt__date {
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
}
.cashflow-tiefpunkt__amount {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.cashflow-tiefpunkt--danger .cashflow-tiefpunkt__amount  { color: var(--color-danger); }
.cashflow-tiefpunkt--warning .cashflow-tiefpunkt__amount { color: var(--color-warning); }
.cashflow-tiefpunkt__arrow {
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}
.cashflow-tiefpunkt--danger  .cashflow-tiefpunkt__arrow  { color: var(--color-danger); }
.cashflow-tiefpunkt--warning .cashflow-tiefpunkt__arrow { color: var(--color-warning); }

/* T-20 — Profil-Fortschrittsanzeige im Top-Nav. */
.profile-progress { position: relative; }
.profile-progress__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-12);
  color: var(--color-text);
}
.profile-progress__trigger:hover { background: var(--color-surface-muted); }
.profile-progress__label { font-weight: var(--fw-medium); white-space: nowrap; }
.profile-progress__bar {
  display: inline-block;
  width: 60px; height: 6px;
  background: var(--color-surface-muted);
  border-radius: 999px;
  overflow: hidden;
}
.profile-progress__bar-fill {
  display: block; height: 100%;
  background: var(--color-primary);
}
.profile-progress__chevron { font-size: 10px; color: var(--color-text-muted); }
.profile-progress__panel {
  position: absolute; right: 0; top: 100%;
  margin-top: 6px;
  min-width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: var(--space-3);
  z-index: 100;
}
.profile-progress__head { font-size: var(--fs-14); margin-bottom: var(--space-2); }
.profile-progress__list { list-style: none; padding: 0; margin: 0; }
.profile-progress__item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-2);
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
}
.profile-progress__item:first-child { border-top: 0; }
.profile-progress__check { font-size: var(--fs-16); line-height: 1.2; }
.profile-progress__item--done { color: var(--color-text-muted); }
.profile-progress__item-label { font-size: var(--fs-12); }
.profile-progress__item-cta {
  display: inline-block;
  margin-top: 2px;
  font-size: var(--fs-12);
  color: var(--color-primary);
  text-decoration: none;
}
.profile-progress__item-cta:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .profile-progress__panel { min-width: 280px; right: -8px; }
  .profile-progress__bar { display: none; }
}

/* T-17 — Cash-Block (3 Felder). */
.cash-block { padding: var(--space-4); margin-bottom: var(--space-4); }
.cash-block__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .cash-block__grid { grid-template-columns: 1fr; }
}
.cash-block__cell {
  border-left: 4px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}
.cash-block__cell--cash       { border-left-color: var(--color-success); }
.cash-block__cell--capital    { border-left-color: #7C3AED; }
.cash-block__cell--bottleneck { border-left-color: var(--color-danger); }
.cash-block__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.cash-block__value {
  font-size: var(--fs-24);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
}
.cash-block__value--muted { color: var(--color-text-muted); font-size: var(--fs-16); }
.cash-block__sub { font-size: var(--fs-12); }

/* T-15 — Action Center kompakt. */
.action-center { padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.action-center__head {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.action-center__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.action-center__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px;
  background: var(--color-surface-muted); color: var(--color-text-muted);
  font-size: var(--fs-12); font-weight: var(--fw-medium);
}
.action-center__list { list-style: none; padding: 0; margin: 0; }
.action-center__row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border);
  font-size: var(--fs-14);
}
.action-center__body { min-width: 0; }
.action-center__line { line-height: 1.35; }
.action-center__line--problem { font-weight: var(--fw-medium); }
.action-center__line--consequence {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.action-center__row:first-child { border-top: 0; }
.action-center__dot { font-size: 14px; line-height: 1; }
.action-center__msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.action-center__chip {
  display: inline-block;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}
.action-center__cta { white-space: nowrap; }
.action-center__toggle {
  display: block;
  margin-top: var(--space-2);
  padding: var(--space-1) 0;
  background: none; border: 0;
  color: var(--color-primary);
  font-size: var(--fs-12);
  cursor: pointer;
}
.action-center__toggle:hover { text-decoration: underline; }
.action-center__empty { padding: var(--space-2) 0; }

/* T-19 — Blur Overlay (verschlossenes Widget mit 4-Punkt-Erklärer). */
.blur-overlay { position: relative; margin-bottom: var(--space-4); border-radius: var(--radius-md); overflow: hidden; }
.blur-overlay__content {
  filter: blur(4px) saturate(0.7);
  pointer-events: none;
  user-select: none;
  opacity: 0.55;
}
.blur-overlay__panel {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  padding: var(--space-4);
  text-align: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
}
.blur-overlay__icon { font-size: var(--fs-24); }
.blur-overlay__badge {
  display: inline-block;
  background: #FEF3C7;
  color: #B45309;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-12);
  padding: 4px var(--space-2);
  border-radius: 999px;
}
.blur-overlay__title { font-weight: var(--fw-semibold); font-size: var(--fs-16); }
.blur-overlay__use { font-size: var(--fs-14); margin: 0; max-width: 520px; }
.blur-overlay__missing { font-size: var(--fs-12); margin: 0; max-width: 520px; }
.blur-overlay__cta { margin-top: var(--space-2); }

/* T-13 — Disabled tab (Launch-Simulator coming soon). */
.tab-strip__tab--disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* T-27 — Info banner (e.g. Startsaldo fehlt). */
.banner--info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-soft);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

/* Sprint 6 — Forecast-Kaskade (Konsequenzkette) on Dashboard. */
.forecast-cascade { margin-bottom: var(--space-4); padding: var(--space-4); }
.forecast-cascade__head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.forecast-cascade__select {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-12);
}
.forecast-cascade__select select {
  padding: 6px var(--space-2);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-12);
}
.forecast-cascade__chain {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.forecast-cascade__step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  border-left: 4px solid var(--color-border);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
}
.forecast-cascade__step-icon {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  font-size: var(--fs-16);
}
.forecast-cascade__step-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.forecast-cascade__step-value {
  font-size: var(--fs-20);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.forecast-cascade__step-sub { font-size: var(--fs-12); margin-top: 2px; }

.forecast-cascade__step--trigger { border-left-color: var(--color-primary); background: var(--color-primary-soft); }
.forecast-cascade__step--danger  { border-left-color: var(--color-danger);  background: rgba(239, 68, 68, 0.05); }
.forecast-cascade__step--warning { border-left-color: var(--color-warning); background: rgba(245, 158, 11, 0.05); }
.forecast-cascade__step--success { border-left-color: var(--color-success); background: rgba(16, 185, 129, 0.05); }
.forecast-cascade__step--neutral { border-left-color: var(--color-border);  background: var(--color-surface-muted); }

.forecast-cascade__arrow {
  align-self: center;
  font-size: var(--fs-16);
  color: var(--color-text-muted);
  padding: 2px 0;
}

/* T-21 — Forecast vs Real kompakter. */
.forecast-real-compact { padding: var(--space-3) var(--space-4); }
.forecast-real-compact__table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.forecast-real-compact__table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-muted); font-weight: var(--fw-medium);
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--color-border);
}
.forecast-real-compact__table th.t-right { text-align: right; }
.forecast-real-compact__table td {
  padding: 8px; border-bottom: 1px solid var(--color-border);
}
.forecast-real-compact__table tr:last-child td { border-bottom: 0; }
.forecast-real-compact__table .t-right { text-align: right; }
.forecast-real-compact__table .tabular { font-variant-numeric: tabular-nums; }

/* T-22 — Inventory Pressure (per product) — 5-cell grid. */
.inv-pressure-product__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}
@media (max-width: 900px) { .inv-pressure-product__grid { grid-template-columns: repeat(2, 1fr); } }
.inv-pressure-product__cell {
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.inv-pressure-product__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.inv-pressure-product__value {
  font-size: var(--fs-16); font-weight: var(--fw-semibold); margin: 2px 0;
}
.inv-pressure-product__sub { font-size: 11px; }
.inv-pressure-product__pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: var(--fs-12); font-weight: var(--fw-semibold);
}
.inv-pressure-product__pill--green  { background: #D1FADF; color: #047857; }
.inv-pressure-product__pill--orange { background: #FEF3C7; color: #B45309; }
.inv-pressure-product__pill--red    { background: #FEE2E2; color: #B91C1C; }
.inv-pressure-product__pill--muted  { background: var(--color-surface-muted); color: var(--color-text-muted); }

/* T-23 — Wo ist mein Geld? (per product). */
.product-money__list { list-style: none; padding: 0; margin: 0; }
.product-money__row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: var(--space-2);
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
  align-items: center;
}
.product-money__row:first-child { border-top: 0; }
.product-money__dot { width: 12px; height: 12px; border-radius: 999px; }
.product-money__label { font-weight: var(--fw-medium); }
.product-money__amount { text-align: right; font-variant-numeric: tabular-nums; }
.product-money__pct { font-size: 11px; margin-left: 6px; }

/* T-25 — Cash Conversion Cycle one-liner. */
.ccc-oneliner {
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary-soft);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: var(--fs-14);
}

/* T-24 — Kostenverteilung mit Gesamtbezug. */
.kostenverteilung__list { list-style: none; padding: 0; margin: 0; }
.kostenverteilung__row {
  display: grid;
  grid-template-columns: 12px 110px 1fr auto;
  gap: var(--space-2);
  padding: 6px 0;
  align-items: center;
  font-size: var(--fs-14);
}
.kostenverteilung__dot { width: 12px; height: 12px; border-radius: 999px; }
.kostenverteilung__label { font-weight: var(--fw-medium); }
.kostenverteilung__bar {
  height: 8px;
  background: var(--color-surface-muted);
  border-radius: 999px;
  overflow: hidden;
  display: block;
}
.kostenverteilung__bar-fill { display: block; height: 100%; }
.kostenverteilung__amount { font-variant-numeric: tabular-nums; }

/* Sprint 5.1 — Forecast vs. Real comparison table on Produktdetail. */
.forecast-real-card { padding: var(--space-4); }
.forecast-real-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
}
.forecast-real-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.forecast-real-table th.t-right { text-align: right; }
.forecast-real-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.forecast-real-table tr:last-child td { border-bottom: 0; }
.forecast-real-table .t-right     { text-align: right; }
.forecast-real-table .tabular     { font-variant-numeric: tabular-nums; }

/* Sprint 2.2 — Health card on Produktdetail. */
.health-card__head { margin-bottom: var(--space-3); }
.health-card__head .card__title { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.health-card__score {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  background: var(--color-surface-muted);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Sprint 2.3 — Gesundheitsstatus column + aufklappbare Begründung. */
.product-table__health-cell { vertical-align: middle; }
.product-table__health-toggle {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  color: var(--color-text);
}
.product-table__health-toggle:hover { text-decoration: none; }
.product-table__health-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 6px;
  font-weight: var(--fw-semibold);
  font-size: 11px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.product-table__health-chevron {
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.product-table__row--clickable { cursor: pointer; }
.product-table__row--clickable:hover td { background: var(--color-surface-muted); }
.product-table__breakdown-row td {
  background: var(--color-surface-muted);
  padding: 0;
}
.product-table__breakdown-wrap {
  padding: var(--space-3) var(--space-4);
}
.product-table__breakdown-summary {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

/* Health breakdown list (shared partial) — used in the row expand + on
   the Produktdetail page. Each row: dot · verdict · meta. */
.health-breakdown {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.health-breakdown__row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: var(--space-2);
  align-items: baseline;
  padding: 6px var(--space-2);
  border-left: 3px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: var(--fs-12);
}
.health-breakdown__row--green  { border-left-color: var(--color-success); }
.health-breakdown__row--yellow { border-left-color: var(--color-warning); }
.health-breakdown__row--red    { border-left-color: var(--color-danger); }
.health-breakdown__row--muted  { border-left-color: var(--color-border); opacity: 0.7; }
.health-breakdown__dot { line-height: 1; }
.health-breakdown__verdict { line-height: 1.3; }
.health-breakdown__meta { font-size: 11px; }

.product-table__legend {
  margin-top: var(--space-3);
  font-size: var(--fs-12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}
.product-table__legend-dots { display: inline-flex; gap: var(--space-2); align-items: center; }
.product-table__legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  margin-right: 4px; vertical-align: middle;
}
.product-table__legend-dot--green  { background: var(--color-success); }
.product-table__legend-dot--yellow { background: var(--color-warning); }
.product-table__legend-dot--red    { background: var(--color-danger); }

/* ── S4 B4: Inventory Pressure (narrow column) ─────────────────────── */
.inventory-pressure__head {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.inventory-pressure__title {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.inventory-pressure__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
/* Sprint 4 — full-width context: flow into 2 columns on wider screens. */
.dashboard-inventory .inventory-pressure__list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-4);
}
@media (max-width: 800px) {
  .dashboard-inventory .inventory-pressure__list { grid-template-columns: 1fr; }
}
.inventory-pressure__row {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}
.inventory-pressure__row:first-child { border-top: 0; padding-top: 0; }
.dashboard-inventory .inventory-pressure__row:nth-child(2) { border-top: 0; padding-top: 0; }
.inventory-pressure__top {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-2);
}
.inventory-pressure__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-14);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-pressure__days {
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.inventory-pressure__bar {
  margin-top: 6px;
  height: 6px;
  background: var(--color-surface-muted);
  border-radius: 999px;
  overflow: hidden;
}
.inventory-pressure__bar-fill { height: 100%; }
.inventory-pressure__sub {
  font-size: 11px;
  margin-top: var(--space-1);
}
.inventory-pressure__more-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--fs-12);
  color: var(--color-primary);
  text-decoration: none;
}
.inventory-pressure__more-link:hover { text-decoration: underline; }

/* ── S4 B5: Cashflow + P&L 3-column row ─────────────────────────────── */
.dashboard-b5 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3);
  align-items: stretch;
}
.dashboard-b5 > * { min-width: 0; }
@media (max-width: 1100px) {
  .dashboard-b5 { grid-template-columns: 1fr; }
}
.dashboard-b5 .cashflow-forecast__pills { display: none; }
.dashboard-b5 .cashflow-forecast .chart-wrap { height: 220px; }
.cashflow-forecast__head { margin-bottom: var(--space-2); }
.cashflow-forecast__subhead { margin: var(--space-1) 0 var(--space-2); font-size: var(--fs-12); }

/* P&L tiles inside the B5 row: tighter type + non-wrapping numbers so the
   right column doesn't push currency onto its own line. */
.dashboard-b5 .card__title { font-size: var(--fs-14); }
.dashboard-b5 .table-soft td {
  font-size: var(--fs-12);
  padding: 6px 0;
  white-space: nowrap;
}
.dashboard-b5 .table-soft td:first-child {
  white-space: normal;
  padding-right: var(--space-2);
}
.dashboard-b5 .text-muted { font-size: var(--fs-12); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* ─── Dashboard UX v2 — Critical Hero (change #1) ───────────────────── */
.critical-hero {
  background: #FFF0F0;
  border: 2px solid #E24B4A;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}
.critical-hero__main {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}
.critical-hero__badge {
  position: absolute;
  margin-top: -32px;
  background: #E24B4A;
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 999px;
}
.critical-hero__icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 999px;
  background: #E24B4A;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; line-height: 1;
}
.critical-hero__body { flex: 1 1 auto; min-width: 0; }
.critical-hero__headline {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: var(--fw-semibold);
  color: #7A1E1E;
}
.critical-hero__subtext {
  margin: var(--space-1) 0 var(--space-3) 0;
  font-size: var(--fs-14);
  color: var(--color-text-muted);
}
.critical-hero__meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: 0;
  font-size: var(--fs-12);
}
.critical-hero__meta > div { display: flex; flex-direction: column; gap: 2px; }
.critical-hero__meta dt { color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; margin: 0; }
.critical-hero__meta dd { margin: 0; font-weight: var(--fw-semibold); }
.critical-hero__cta { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-end; }
.critical-hero__more { font-size: var(--fs-12); }

/* ─── Compact actions list (change #2) ──────────────────────────────── */
.actions-list {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}
.actions-list__header {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.actions-list__title { margin: 0; font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.actions-list__items { list-style: none; padding: 0; margin: 0; }
.actions-list__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--color-border);
}
.actions-list__row:first-child { border-top: 0; }
.actions-list__dot {
  flex-shrink: 0;
  width: 8px; height: 8px; border-radius: 999px;
}
.actions-list__dot--red    { background: var(--color-danger); }
.actions-list__dot--yellow { background: var(--color-warning, #F59E0B); }
.actions-list__dot--blue   { background: var(--color-primary); }
.actions-list__message { flex: 1 1 auto; font-size: 13px; min-width: 0; }
.actions-list__cta { display: flex; gap: var(--space-1); align-items: center; flex-shrink: 0; }
.actions-list__menu { position: relative; }
.actions-list__menu summary {
  list-style: none; cursor: pointer; padding: 0 6px;
  color: var(--color-text-muted); font-size: var(--fs-16);
}
.actions-list__menu summary::-webkit-details-marker { display: none; }
.actions-list__menu-items {
  position: absolute; right: 0; top: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: var(--space-1);
  z-index: 10;
  min-width: 160px;
}
.actions-list__toggle {
  display: block;
  margin-top: var(--space-2);
  padding: var(--space-2) 0;
  background: none; border: 0;
  color: var(--color-primary);
  font-size: var(--fs-12);
  cursor: pointer;
}
.actions-list__toggle:hover { text-decoration: underline; }

/* ─── Profile checklist (change #3) ─────────────────────────────────── */
.profile-checklist {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.profile-checklist__bar {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 48px;
}
.profile-checklist__toggle {
  background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; align-items: center; gap: var(--space-2);
  font-family: inherit; font-size: inherit;
}
.profile-checklist__chevron { color: var(--color-text-muted); }
.profile-checklist__progress {
  flex: 1 1 auto;
  height: 4px;
  background: var(--color-surface-muted);
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
}
.profile-checklist__fill { height: 100%; background: var(--color-primary); }
.profile-checklist__cta { flex-shrink: 0; }
.profile-checklist__body { margin-top: var(--space-3); }

/* ─── Standalone cashflow stress toggle (change #6) ─────────────────── */
.cashflow-stress--standalone {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}
.cashflow-stress__toggle {
  background: none; border: 0; cursor: pointer;
  color: #185FA5;
  font-size: var(--fs-12);
  padding: var(--space-1) 0;
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-family: inherit;
}
.cashflow-stress__toggle:hover { text-decoration: underline; }

/* ─── Product card — Hauptproblem row (change #5) ──────────────────── */
.product-card__problem {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-muted);
  border-radius: var(--radius-sm);
  font-size: var(--fs-12);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.product-card__problem-label { color: var(--color-text-muted); }
.product-card__problem-text { flex: 1 1 auto; min-width: 0; }
.product-card__impact { font-weight: var(--fw-semibold); }

.table-soft { width: 100%; border-collapse: collapse; }
.table-soft td { padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border-soft, var(--color-border)); }
.table-soft tr:last-child td { border-bottom: 0; }
.table-soft .row-total td { border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.tabular { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }

.paywall-teaser__blurred {
  filter: blur(3px);
  user-select: none;
  pointer-events: none;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.product-ranking { display: flex; flex-direction: column; gap: var(--space-2); }

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.product-card--success { border-left-color: var(--color-success); }
.product-card--warning { border-left-color: var(--color-warning, #F59E0B); }
.product-card--danger  { border-left-color: var(--color-danger); }
.product-card--muted   { border-left-color: var(--color-border); }
.product-card__main { flex: 1; }
.product-card__title { margin-bottom: var(--space-1); }
.product-card__metrics { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--fs-14); }
.product-card__actions { display: flex; gap: var(--space-2); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning, #B45309); }
.text-danger  { color: var(--color-danger); }
.text-muted   { color: var(--color-text-muted); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm, 6px);
  color: var(--color-text-subtle);
  text-decoration: none;
  font-size: var(--fs-16);
}
.icon-btn:hover { background: var(--color-bg-subtle); color: var(--color-text); }

.badge--soft {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill, 999px);
  font-size: var(--fs-12);
}

@media (max-width: 1200px) {
  .kpi-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-bar { grid-template-columns: repeat(2, 1fr); }
  .grid-2  { grid-template-columns: 1fr; }
}

/* Inline "?" help icon with a styled CSS tooltip bubble.
   .help-tip is the wrapper (focusable for keyboard a11y).
   .help-tip__icon is the visible circle.
   .help-tip__bubble is the popup, hidden by default, shown on hover/focus. */
.help-tip {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  vertical-align: middle;
  cursor: help;
  user-select: none;
  outline: none;
}
.help-tip__icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.help-tip:hover .help-tip__icon,
.help-tip:focus-visible .help-tip__icon {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.help-tip__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: 100;
  width: max-content;
  max-width: 280px;
  padding: var(--space-2) var(--space-3);
  background: var(--color-text);
  color: #fff;
  font-size: var(--fs-12);
  font-weight: var(--fw-regular);
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
/* Triangle pointer on the bubble. */
.help-tip__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-text);
}
/* Invisible hover bridge so the bubble stays open while the cursor travels
   from the icon up into the bubble (covers the 8px gap). */
.help-tip__bubble::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  height: 10px;
}
.help-tip:hover .help-tip__bubble,
.help-tip:focus-visible .help-tip__bubble,
.help-tip:focus-within .help-tip__bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* Flip to bottom side when wrapper sits near the top edge of its container.
   Apply <span class="help-tip help-tip--bottom"> for tooltips that would
   otherwise be clipped. */
.help-tip--bottom .help-tip__bubble {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
.help-tip--bottom .help-tip__bubble::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--color-text);
}
.help-tip--bottom .help-tip__bubble::before {
  top: auto;
  bottom: 100%;
}
.help-tip--bottom:hover .help-tip__bubble,
.help-tip--bottom:focus-visible .help-tip__bubble,
.help-tip--bottom:focus-within .help-tip__bubble {
  transform: translateX(-50%) translateY(0);
}

/* Back-compat: legacy `.help-icon` class still styled if anything bypasses
   the helper. New code uses .help-tip + .help-tip__icon. */
.help-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
  user-select: none;
}
.help-icon:hover, .help-icon:focus-visible {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  outline: none;
}

/* Onboarding completion meter — single-line, always visible on dashboard. */
.onboarding-meter {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-2) 0;
}
.onboarding-meter__row {
  display: flex; justify-content: space-between; align-items: center;
}
.onboarding-meter__bar { height: 4px; }

/* Next-decision callout — the single highest-priority recommendation. */
.next-decision {
  border: 1px solid var(--color-border);
  border-left: 6px solid var(--color-text-muted);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-4) var(--space-4);
}
.next-decision--critical { border-left-color: var(--color-danger); }
.next-decision--warning  { border-left-color: var(--color-warning, #F59E0B); }
.next-decision--info     { border-left-color: var(--color-primary); }
.next-decision__head {
  display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--fs-14);
}
.next-decision__message {
  font-size: var(--fs-16);
  line-height: 1.4;
  margin: 0 0 var(--space-3) 0;
}

/* Accountant export — clean, print-optimised. */
.accountant-export {
  max-width: 920px;
  margin: 0 auto;
  color: #111;
}
.accountant-export__header { margin-bottom: var(--space-6); }
.accountant-export__header h1 { font-size: 28px; margin-bottom: var(--space-2); }
.accountant-export__section { margin-bottom: var(--space-6); page-break-inside: avoid; }
.accountant-export__section h2 {
  font-size: 18px; margin: var(--space-4) 0 var(--space-2);
  border-bottom: 2px solid #333; padding-bottom: 4px;
}
.accountant-export__table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.accountant-export__table th,
.accountant-export__table td {
  padding: 6px 10px; border-bottom: 1px solid #ddd; vertical-align: top;
}
.accountant-export__table thead th {
  background: #f5f5f5; text-align: left; font-weight: 600;
}
.accountant-export__footer {
  margin-top: var(--space-6); padding-top: var(--space-3);
  border-top: 1px solid #ddd; font-size: 11px;
}
@media print {
  .accountant-export__no-print { display: none !important; }
  .app-header, .banner, .flash { display: none !important; }
  body { background: white; }
  .page { padding: 0 !important; }
}

.sync-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-left: var(--space-2);
  vertical-align: middle;
}
.sync-dot--success { background: var(--color-success); }
.sync-dot--warning { background: var(--color-warning, #F59E0B); }
.sync-dot--danger  { background: var(--color-danger); }

.event-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.event-timeline__row {
  display: grid;
  grid-template-columns: 84px 24px 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}
.event-timeline__row:last-child { border-bottom: none; }
.event-timeline__date { font-size: var(--fs-12); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.event-timeline__icon { font-size: var(--fs-16); }
.event-timeline__title { font-weight: var(--fw-medium); }
.event-timeline__detail { font-size: var(--fs-12); margin-top: 2px; }

/* FI-spec v3.1 #12: horizontal event timeline strip sits above the list.
   Each event is an absolutely-positioned colored dot on a relative track. */
.event-timeline-strip {
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-3) var(--space-2);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.event-timeline-strip__axis {
  position: relative;
  height: 28px;
  border-top: 1px dashed var(--color-border-strong);
  margin-top: 12px;
}
.event-timeline-strip__dot {
  position: absolute;
  top: -5px;
  width: 12px; height: 12px;
  margin-left: -6px;
  border-radius: 999px;
  border: 2px solid var(--color-surface);
  cursor: pointer;
  padding: 0;
  background: var(--color-text-muted);
  transition: transform 0.12s ease;
}
.event-timeline-strip__dot:hover,
.event-timeline-strip__dot:focus-visible {
  transform: scale(1.4);
  outline: none;
}
.event-timeline-strip__dot--blue   { background: #1E40FF; }
.event-timeline-strip__dot--green  { background: #10B981; }
.event-timeline-strip__dot--red    { background: #EF4444; }
.event-timeline-strip__dot--yellow { background: #F59E0B; }
.event-timeline-strip__labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-12);
  margin-top: var(--space-2);
}

.product-card__sparkline {
  margin-top: var(--space-2);
  max-width: 220px;
  position: relative;
}
.product-card__sparkline canvas { width: 100% !important; height: 100% !important; }

/* YTD target progress bar (used on /finanzen). */
.progress-bar {
  background: var(--color-border);
  border-radius: var(--radius-pill, 999px);
  height: 6px;
  overflow: hidden;
  margin-top: var(--space-1);
}
.progress-bar__fill {
  height: 100%;
  background: var(--color-success);
  transition: width 240ms ease;
}

/* Phone-class breakpoint — collapse multi-column forms, stack product card metrics. */
@media (max-width: 640px) {
  .kpi-bar { grid-template-columns: 1fr; gap: var(--space-2); }
  .kpi-tile { padding: var(--space-2); }
  .kpi-tile__value { font-size: var(--fs-20); }

  .financial-grid { grid-template-columns: 1fr !important; }
  .product-card { flex-direction: column; align-items: stretch; }
  .product-card__metrics { gap: var(--space-2); }
  .product-card__actions { justify-content: flex-start; }
  .product-ranking .product-card { padding: var(--space-3); }

  .chart-wrap { height: 240px; }
  .chart-wrap--donut { height: 260px; }

  /* Auto-row footers wrap to 1 column on phone */
  .auto-row { grid-template-columns: 1fr !important; }

  /* Tight up button rows in forms */
  .form-field input,
  .form-field select { width: 100%; }

  /* Allow wide tables to scroll horizontally instead of overflowing the card */
  .data-table { display: block; overflow-x: auto; }
  .data-table th, .data-table td { padding: var(--space-2) var(--space-3); white-space: nowrap; }

  /* Page padding shrinks */
  .page { padding-left: var(--space-3); padding-right: var(--space-3); }
}

/* ── KI Insight (Sprint 5 Slice B) ──────────────────────────── */

.insight-analysis {
  font-size: var(--fs-16);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.insight-ctas {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.insight-meta {
  font-size: var(--fs-12);
  margin-bottom: 0;
}

.insight-loading { min-height: 140px; }

.insight-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}
.insight-skeleton__line {
  height: 12px;
  background: linear-gradient(90deg, var(--color-border-soft) 0%, var(--color-border) 50%, var(--color-border-soft) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: insight-shimmer 1.4s ease-in-out infinite;
}
.insight-skeleton__line--short { width: 60%; }

@keyframes insight-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Dashboard charts (Sprint 5 Slice C) ────────────────────── */

.chart-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}
.chart-wrap--donut { height: 320px; }

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}
.chart-header .card__title { margin-bottom: 0; }

.chart-toggle {
  display: flex;
  gap: var(--space-1);
  background: var(--color-bg-subtle);
  padding: var(--space-1);
  border-radius: var(--radius-pill);
}
.chart-toggle .btn { border: 0; }
.chart-toggle .btn--active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* ── Amazon connection banner (Sprint 6 — Slice 2) ────────── */

.banner--amazon-connected,
.banner--amazon-disconnected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border-left: 4px solid;
}
.banner--amazon-connected   { background: var(--color-success-bg); border-left-color: var(--color-success); }
.banner--amazon-disconnected { background: var(--color-warning-bg); border-left-color: var(--color-warning); }
.banner--amazon-connected code,
.banner--amazon-disconnected code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: rgba(255,255,255,0.5);
  padding: 0 var(--space-1);
  border-radius: var(--radius-sm);
}

/* ── Mobile responsive (Sprint 6 — Slice B.1) ───────────────── */

@media (max-width: 700px) {
  /* App header — compact, allow nav wrap, drop brand subtitle */
  .app-header__inner       { gap: var(--space-3); padding: 0 var(--space-3); }
  .app-header__nav         { gap: var(--space-3); }
  .app-header__brand-tag   { display: none; }
  .app-header__brand-logo  { height: 26px; }

  /* Page padding tightens */
  .page { padding: var(--space-4) var(--space-3); }

  /* KPI bar 2-col → single column under 700 */
  .kpi-bar { grid-template-columns: 1fr; }

  /* Banners stack their CTA below the text instead of squeezing it sideways */
  .banner--onboarding,
  .banner--amazon-connected,
  .banner--amazon-disconnected {
    flex-direction: column;
    align-items: flex-start;
  }
  .banner--onboarding .btn,
  .banner--amazon-connected .btn,
  .banner--amazon-disconnected .btn { align-self: stretch; text-align: center; }

  /* Product card metrics wrap into a column when there's not enough width */
  .product-card { flex-direction: column; align-items: stretch; }
  .product-card__actions { justify-content: flex-end; }
  .product-card__metrics { gap: var(--space-2); font-size: var(--fs-12); }

  /* Chart cards: a bit shorter so they don't dominate the scroll */
  .chart-wrap { height: 220px; }
  .chart-wrap--donut { height: 260px; }

  /* Chart header toggle: allow wrap so labels don't collide with the title */
  .chart-header { flex-wrap: wrap; }

  /* Modal-card padding tightens */
  .modal-card { padding: var(--space-6) var(--space-4); }

  /* Variant grid: 4 across collapses to single column */
  .variant-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  /* Header nav: collapse into a hamburger that toggles a vertical menu. */
  .app-header__nav-toggle { display: inline-flex; }
  .app-header__nav-wrap .app-header__nav { display: none; }

  .app-header__nav-wrap.is-open .app-header__nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: var(--space-2);
    z-index: 30;
  }
  .app-header__nav-wrap.is-open .app-header__nav-link {
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }
  .app-header__nav-wrap.is-open .app-header__nav-link:last-child { border-bottom: none; }
  .app-header__nav-wrap.is-open .app-header__nav-link--active {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-muted);
  }
}

.banner__actions { display: flex; gap: var(--space-2); }

/* ── Avatar dropdown menu (top-right) ─────────────────────── */

.app-dropdown { position: relative; }

.app-dropdown__trigger {
  /* Reset native button chrome but leave background/color alone
     so the host class (e.g. .app-header__avatar) keeps its visuals. */
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.app-dropdown__menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-1) 0;
  z-index: 200;

  /* Hidden by default — opacity + visibility lets us animate cleanly */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
}

.app-dropdown:hover .app-dropdown__menu,
.app-dropdown:focus-within .app-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 120ms ease, transform 120ms ease;
}

.app-dropdown__email {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-1);
}

.app-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-14);
  color: var(--color-text);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.app-dropdown__item:hover {
  background: var(--color-bg-subtle);
  text-decoration: none;
}

.app-dropdown__item--button {
  /* button_to renders a real <button> — strip the implicit black + uppercase styling */
}
.app-dropdown__item--danger { color: var(--color-danger); }

/* ── Portfolio (S5) ───────────────────────────────────────── */

.portfolio { display: flex; flex-direction: column; gap: var(--space-5); }

.portfolio__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Hint banner — "Wie möchtest du dein Produkt hinzufügen?" */
.portfolio-hint {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  align-items: center;
}
@media (max-width: 900px) {
  .portfolio-hint { grid-template-columns: 1fr; }
}
.portfolio-hint__title { font-size: var(--fs-14); font-weight: var(--fw-semibold); margin: 0; }
.portfolio-hint__lead  { font-size: var(--fs-12); color: var(--color-text-muted); margin: 4px 0 0; }
.portfolio-hint__choices {
  display: contents;
}
.portfolio-hint__choice {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg-subtle);
  transition: background 80ms ease, border-color 80ms ease;
  min-width: 220px;
}
.portfolio-hint__choice:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  text-decoration: none;
}
.portfolio-hint__choice-icon { font-size: 20px; }
.portfolio-hint__choice-title { font-size: var(--fs-14); font-weight: var(--fw-semibold); }
.portfolio-hint__choice-body  { font-size: var(--fs-12); color: var(--color-text-muted); margin: 2px 0 0; }

/* Section heads (Produktgruppen, Standalone-Produkte) */
.portfolio-section { display: flex; flex-direction: column; gap: var(--space-3); }
.portfolio-section__head { display: flex; flex-direction: column; gap: 2px; }
.portfolio-section__title {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.portfolio-section__count {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-pill);
  padding: 2px var(--space-2);
}
.portfolio-section__lead { font-size: var(--fs-12); color: var(--color-text-muted); margin: 0; }

/* Group / standalone card */
.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.portfolio-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: start;
}
.portfolio-card__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: var(--radius-md);
}
.portfolio-card__icon--group     { background: #ede9fe; color: #6d28d9; }
.portfolio-card__icon--standalone { background: #dcfce7; color: #166534; }

.portfolio-card__title-row { display: flex; flex-direction: column; gap: 2px; }
.portfolio-card__title {
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.portfolio-card__badge {
  font-size: var(--fs-12);
  font-weight: var(--fw-regular);
  color: var(--color-primary);
  background: #e0e7ff;
  border-radius: var(--radius-pill);
  padding: 2px var(--space-2);
}
.portfolio-card__meta { font-size: var(--fs-12); color: var(--color-text-muted); margin: 0; }
.portfolio-card__description { font-size: var(--fs-12); color: var(--color-text-muted); margin: 0; max-width: 60ch; }
.portfolio-card__metrics {
  display: flex;
  gap: var(--space-4);
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  margin: 4px 0 0;
}
.portfolio-card__metrics strong { color: var(--color-text); }

.portfolio-card__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Variant grid inside a group card */
.portfolio-card__variants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}

.portfolio-tile {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "head head"
    "metrics arrow";
  gap: 4px var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  text-decoration: none;
  color: var(--color-text);
  transition: background 80ms ease, border-color 80ms ease;
}
.portfolio-tile:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  text-decoration: none;
}
.portfolio-tile__head {
  grid-area: head;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}
.portfolio-tile__name { font-weight: var(--fw-semibold); font-size: var(--fs-14); }
.portfolio-tile__metrics {
  grid-area: metrics;
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.portfolio-tile__metrics strong { color: var(--color-text); }
.portfolio-tile__arrow {
  grid-area: arrow;
  align-self: center;
  color: var(--color-text-muted);
}

/* Status badges */
.portfolio-status {
  display: inline-block;
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
}
.portfolio-status--active   { background: #dcfce7; color: #166534; }
.portfolio-status--planning { background: #fef3c7; color: #92400e; }
.portfolio-status--archived { background: var(--color-bg-subtle); color: var(--color-text-muted); }

.portfolio-card--archived {
  opacity: 0.75;
}
.portfolio-card--archived .portfolio-card__icon {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
  filter: grayscale(1);
}

.portfolio-actions { position: relative; }

/* Variant drill-down on dashboard product card */
.product-card__variants {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: var(--space-2) 0 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-card__variant {
  font-size: var(--fs-12);
}
.product-card__variant-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  transition: background-color 120ms ease;
}
.product-card__variant-link:hover,
.product-card__variant-link:focus-visible {
  background: var(--color-bg-subtle, rgba(0, 0, 0, 0.04));
  text-decoration: none;
}
.product-card__variant-name { font-weight: var(--fw-semibold); }
.product-card__variant-arrow {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: var(--fs-14);
}
.product-card__variant-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
}
.product-card__variant-dot--success  { background: var(--color-success); }
.product-card__variant-dot--warning  { background: var(--color-warning); }
.product-card__variant-dot--danger   { background: var(--color-danger); }
.product-card__variant-dot--muted    { background: var(--color-text-muted); }

.card__head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* Footer CTA — "Add your next product" */
.portfolio-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
}
.portfolio-cta:hover {
  border-color: var(--color-primary);
  text-decoration: none;
}
.portfolio-cta__plus {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--color-text-muted);
}
.portfolio-cta__copy { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.portfolio-cta__copy span { font-size: var(--fs-12); color: var(--color-text-muted); }

/* Chooser grid — picker view when multi-product on /financial-input or /operations */
.chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.chooser-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
  transition: background 80ms ease, border-color 80ms ease;
}
.chooser-tile:hover {
  background: var(--color-bg-subtle);
  border-color: var(--color-primary);
  text-decoration: none;
}
.chooser-tile__title { font-weight: var(--fw-semibold); font-size: var(--fs-14); }
.chooser-tile__meta  { font-size: var(--fs-12); color: var(--color-text-muted); }

/* ── F3 — Kontostand read-only display when Amazon sync active ─ */
.kontostand-readonly {
  padding: var(--space-3);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.kontostand-readonly__value {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--fs-16);
}

/* ── v1.0 §2.5 — Dashboard period filter (3/6/12 Monate) ────── */
.dashboard-period {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 8px 4px 12px;
  background: var(--color-surface-2, #f5f6fa);
  border: 1px solid var(--color-border, #e1e4ea);
  border-radius: 999px;
  font-size: var(--fs-13);
}
.dashboard-period__label {
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted, #6b7280);
}
.dashboard-period__option {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-text-muted, #4b5563);
  transition: background-color .15s, color .15s;
}
.dashboard-period__option.is-active {
  background: #1E40FF;
  color: #fff;
}
.dashboard-period__option:hover:not(.is-active) {
  background: #e5e7eb;
}
.dashboard-period__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ── v1.0 §2.1 — Liquiditätsstatus-Modul ─────────────────────── */
.liquidity-status {
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: var(--space-4);
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
}
.liquidity-status--strained {
  background: linear-gradient(180deg, #fef2f2 0%, #fef2f2 100%);
  border-color: #fecaca;
}
.liquidity-status__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.liquidity-status__title-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.liquidity-status__title {
  margin: 0;
  font-size: var(--fs-18);
  font-weight: var(--fw-semibold);
  color: #065f46;
}
.liquidity-status__sub {
  margin: 2px 0 0;
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.liquidity-status__section-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.liquidity-status__points {
  margin: 0 0 var(--space-2);
  padding-left: var(--space-3);
  font-size: var(--fs-13);
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.liquidity-status__driver-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.liquidity-status__driver-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.liquidity-status__driver-label {
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
}
.liquidity-status__driver-detail {
  font-size: var(--fs-12);
}
.liquidity-status--strained .liquidity-status__title {
  color: #991b1b;
}
.liquidity-status__icon {
  font-size: 1.3em;
}
.liquidity-status__hero {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.liquidity-status__hero-label {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.liquidity-status__hero-value {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  color: #065f46;
  font-variant-numeric: tabular-nums;
}
.liquidity-status--strained .liquidity-status__hero-value {
  color: #b91c1c;
}
.liquidity-status__hero-sub {
  font-size: var(--fs-12);
  color: var(--color-text-muted);
}
.liquidity-status__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}
@media (max-width: 760px) {
  .liquidity-status__body { grid-template-columns: 1fr; }
}
.liquidity-status__summary {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--fs-13);
}
.liquidity-status__summary li::before {
  content: "•";
  margin-right: 6px;
  color: var(--color-text-muted);
}
.liquidity-status__drivers-title {
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: var(--space-2);
}
.liquidity-status__drivers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.liquidity-status__driver {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  gap: var(--space-2);
  align-items: center;
  font-size: var(--fs-13);
}
.liquidity-status__driver-bar {
  background: #e5e7eb;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.liquidity-status__driver-bar-fill {
  height: 100%;
  background: #ef4444;
  border-radius: 4px;
}
.liquidity-status--secured .liquidity-status__driver-bar-fill {
  background: #10b981;
}
.liquidity-status__driver-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
}
.liquidity-status__recommendation {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.55);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: var(--fs-13);
  border-left: 3px solid #10b981;
}
.liquidity-status--strained .liquidity-status__recommendation {
  border-left-color: #ef4444;
}
.liquidity-status__recommendation strong { display: block; margin-bottom: 2px; }

/* ── v1.0 Frachtkosten-Rechner (2026-06-29) ──────────────── */
.breadcrumb {
  font-size: var(--fs-13);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.breadcrumb__link { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb__link:hover { color: #1E40FF; }
.breadcrumb__sep { margin: 0 6px; }
.breadcrumb__current { color: var(--color-text); font-weight: var(--fw-semibold); }

.page__header { margin-bottom: var(--space-4); }
.page__subtitle { color: var(--color-text-muted); max-width: 720px; }

.freight__grid {
  display: grid;
  grid-template-columns: 48% 52%;
  gap: var(--space-4);
}
@media (max-width: 960px) {
  .freight__grid { grid-template-columns: 1fr; }
}

.freight-stepper {
  display: flex;
  gap: var(--space-2);
  padding: 0;
  margin: 0 0 var(--space-3);
  list-style: none;
}
.freight-stepper__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--color-text-muted);
  font-size: var(--fs-13);
  font-weight: var(--fw-semibold);
}
.freight-stepper__step--active {
  background: #1E40FF;
  color: #fff;
}
.freight-stepper__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 11px;
}
.freight-stepper__step:not(.freight-stepper__step--active) .freight-stepper__num {
  background: #d1d5db; color: #fff;
}

.freight-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
@media (max-width: 560px) {
  .freight-modes { grid-template-columns: 1fr 1fr; }
}
.freight-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background-color .15s;
}
.freight-mode__input { position: absolute; opacity: 0; pointer-events: none; }
.freight-mode__label { font-weight: var(--fw-semibold); font-size: var(--fs-14); }
.freight-mode__sub { font-size: var(--fs-12); color: var(--color-text-muted); margin-top: 2px; }
.freight-mode:hover { border-color: #1E40FF; }
.freight-mode--active {
  border-color: #1E40FF;
  background: #eef2ff;
}

.freight-packages { width: 100%; border-collapse: collapse; margin-top: var(--space-2); }
.freight-packages th { text-align: left; font-size: var(--fs-12); color: var(--color-text-muted); padding: 6px 4px; }
.freight-packages td { padding: 4px; }
.freight-packages input { width: 100%; }
.btn--icon { padding: 6px 10px; font-weight: var(--fw-bold); }
.btn--block { width: 100%; padding: 14px; font-size: var(--fs-16); }

/* Ergebnis-Card (dunkles KPI-Panel, §4) */
.freight-result {
  background: linear-gradient(180deg, #0b1530 0%, #142046 100%);
  color: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}
.freight-result__head { margin-bottom: var(--space-3); }
.freight-result__title { margin: 0; font-size: var(--fs-16); font-weight: var(--fw-semibold); color: #cbd5f5; }
.freight-result__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 560px) {
  .freight-result__kpis { grid-template-columns: 1fr 1fr; }
}
.freight-result__kpi-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.freight-result__kpi-value { font-size: var(--fs-20); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; color: #fff; margin-top: 4px; }
.freight-result__kpi-value--accent { color: #38bdf8; }
.freight-result__hints { margin-top: var(--space-3); display: flex; flex-direction: column; gap: 6px; }
.freight-result__hint {
  background: rgba(248, 191, 64, 0.12);
  border-left: 3px solid #f59e0b;
  padding: 8px 12px;
  font-size: var(--fs-13);
  border-radius: 6px;
}
.freight-result__disclaimer {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-12);
  color: #94a3b8;
}

/* Partner-Liste (§5) */
.freight-partners__test-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: var(--fs-13);
  margin: var(--space-2) 0 var(--space-3);
}
.freight-partners__test-banner code {
  background: rgba(146, 64, 14, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.freight-partners__list { list-style: none; margin: 0; padding: 0; }
.freight-partners__row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  align-items: center;
}
.freight-partners__row:last-child { border-bottom: none; }
.freight-partners__badge {
  width: 48px; height: 48px; border-radius: 12px;
  color: #fff; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-16);
}
.freight-partners__name { font-weight: var(--fw-semibold); }
.freight-partners__tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.badge--soft { background: #eef2ff; color: #3730a3; font-weight: var(--fw-semibold); }
.freight-partners__desc { margin: 0; font-size: var(--fs-13); color: var(--color-text-muted); }
.btn--outline { background: transparent; color: #1E40FF; border: 1px solid #1E40FF; }
.btn--outline:hover { background: #1E40FF; color: #fff; }

/* Info-CTA (§6, hellblau) */
.freight-info-cta {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  background: #dbeafe;
  border-radius: 14px;
  padding: 18px 20px;
}
.freight-info-cta__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.freight-info-cta__title { font-weight: var(--fw-semibold); }
.freight-info-cta__text { margin: 4px 0 0; font-size: var(--fs-13); color: #1e3a8a; }

.form-grid { display: grid; gap: var(--space-3); }
.form-grid--2 { grid-template-columns: 1fr 1fr; }

/* ── v1.0 Finanzen §5 — SP-API-importierte Erstattungs-Zeile ── */
.pending-reimbursement--imported {
  background: linear-gradient(90deg, rgba(30, 64, 255, 0.04), transparent 40%);
}

/* ── F4 — Sandbox ribbon (staging only) ──────────────────── */
.sandbox-ribbon {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
}
