/* Demo Fulfillment GmbH - Live-Demo Stylesheet. Produkt-Look-Klon (Ops-Cockpit), umgefaerbt. */

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../fonts/space-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../../fonts/space-mono-700.woff2") format("woff2");
}

:root {
  --accent: #0FB5AE;
  --accent-strong: #0A8F89;
  --accent-soft: #D5F2F0;
  --accent-wash: #F0FAF9;
  --accent-btn: #06756B;
  --accent-btn-deep: #055D55;
  --bg: #F4F6F7;
  --surface: #FFFFFF;
  --surface-tint: #F1F5F6;
  --border: #DCE4E6;
  --text: #0D1F2A;
  --muted: #5A6D73;
  --muted-strong: #344950;
  --ok: #16A34A;
  --warn: #D97706;
  --danger: #DC2626;
  --shadow-soft: 0 18px 50px rgba(20, 60, 60, 0.10);
  --shadow-lift: 0 28px 70px rgba(20, 60, 60, 0.14);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Space Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --rail-w-open: 210px;
}

.np-demo, .np-demo * {
  box-sizing: border-box;
}
.np-demo {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
.np-demo .num { font-variant-numeric: tabular-nums; }

/* ---------- INTRO (SEO: statischer, crawlbarer Text ueber das echte Produkt max.dash,
   VOR dem fiktiven Cockpit. Schlank halten, kein bildschirmfuellender Hero.) ---------- */
.demo-intro {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: clamp(28px, 5vw, 48px) clamp(18px, 4vw, 48px);
}
.demo-intro-inner { max-width: 760px; margin: 0 auto; }
.rail-logo { display: block; padding: 4px 22px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.rail-logo img { height: 22px; width: auto; display: block; }
.header-home {
  display: none;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: 4px;
  white-space: nowrap;
}
.header-home b { color: var(--accent); }
.header-home:hover { color: var(--accent-btn); }
.demo-intro-station {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-btn);
  margin-bottom: 14px;
}
.demo-intro-title {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}
.demo-intro-body p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted-strong);
  margin-bottom: 12px;
  max-width: 66ch;
}
.demo-intro-body p:last-child { margin-bottom: 0; }
.demo-intro-cta {
  margin-top: 22px;
  background: var(--accent-btn);
  color: #fff;
  font-weight: 750;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 9px;
  border: 1px solid var(--accent-btn-deep);
  cursor: pointer;
}
.demo-intro-cta:hover { background: var(--accent-btn-deep); }

/* ---------- SHELL ---------- */
.demo-shell {
  min-height: 100vh;
  background: var(--bg);
  padding-left: var(--rail-w-open);
}
.demo-main {
  padding: clamp(16px, 2.4vw, 38px);
  padding-bottom: calc(clamp(16px, 2.4vw, 38px) + 20px);
}

/* ---------- HEADER ---------- */
.demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(16px, 2vw, 24px);
  flex-wrap: wrap;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.3vw, 20px);
  min-width: 0;
}
.brand-mark {
  width: clamp(46px, 4.2vw, 60px);
  height: clamp(46px, 4.2vw, 60px);
  flex: none;
  border-radius: 16px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-wash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-btn);
}
.brand-text { min-width: 0; }
.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name b { color: var(--text); }
.brand-name span { color: var(--muted); font-weight: 650; }
.header-titles { display: flex; align-items: center; gap: 18px; }
.header-titles .divider { width: 1px; height: 34px; background: var(--border); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.sync-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.header-book-link {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted-strong);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
}
.header-book-link:hover { border-color: var(--accent); color: var(--accent-btn); }
.header-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.header-btn:hover { border-color: var(--accent); color: var(--accent-btn); }
.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--accent-soft);
}
.tour-restart-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-btn);
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
}
.tour-restart-btn:hover { border-color: var(--accent); }

/* ---------- NAV RAIL ---------- */
.nav-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w-open);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  gap: 2px;
  z-index: 20;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: rgba(15, 181, 174, 0.07); }
.nav-item.is-active {
  border-left-color: var(--accent);
  color: var(--text);
  font-weight: 750;
  background: var(--accent-wash);
}
.nav-icon { flex: none; display: flex; }
.nav-label { white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.nav-lock { color: var(--muted); opacity: 0.7; display: inline-flex; }
.nav-item.is-locked { color: var(--muted); opacity: 0.75; }
.nav-item.is-locked:hover { opacity: 1; }

/* ---------- VIEWS ---------- */
.demo-view { display: none; }
.demo-view.is-active { display: block; }

.dashboard-title {
  font-size: clamp(28px, 3.5vw, 68px);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: 0;
  margin: 0;
}
.dashboard-subline {
  margin-top: 7px;
  color: var(--muted);
  font-size: clamp(14px, 1vw, 21px);
  font-weight: 650;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(clamp(76px, 6.4vw, 126px), auto);
  gap: clamp(12px, 1.1vw, 22px);
  margin-top: clamp(16px, 2.4vw, 32px);
}
.dashboard-grid-item {
  grid-column: span var(--block-w, 3);
  grid-row: span var(--block-h, 1);
  min-width: 0;
}

.block-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(13, 31, 42, 0.08);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 1.6vw, 26px);
  display: flex;
  flex-direction: column;
}
.block-title {
  color: var(--muted-strong);
  font-size: clamp(13px, 0.9vw, 18px);
  font-weight: 800;
  line-height: 1.15;
}

/* ---------- KPI ---------- */
.kpi-card { container-type: inline-size; justify-content: center; gap: 8px; }
.kpi-card.is-priority {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6)),
    linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,0.7));
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-lift);
}
.kpi-label {
  color: var(--accent-btn);
  font-size: clamp(13px, 1vw, 18px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.kpi-card:not(.is-priority) .kpi-label { color: var(--muted-strong); }
.kpi-value {
  color: var(--accent-btn);
  font-size: clamp(40px, 22cqi, 100px);
  font-weight: 900;
  line-height: 0.88;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.kpi-card:not(.is-priority) .kpi-value {
  font-size: clamp(32px, 20cqi, 68px);
  color: var(--muted-strong);
}
.kpi-sub { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- FORECAST ---------- */
.forecast-block { gap: 10px; }
.fc-num { font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1; }
.fc-sub { font-size: 12px; color: var(--muted); }
.fc-progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
.fc-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.fc-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s; }
.fc-week {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.fc-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.fc-day.is-today { background: var(--accent-wash); border-color: var(--accent-soft); }
.fc-day-lab { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.fc-day-val { font-size: 11px; font-weight: 750; color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.fc-day.is-today .fc-day-val { color: var(--accent-btn); }

/* ---------- BAR CHART ---------- */
.bar-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: clamp(4px, 0.8vw, 10px);
  min-height: 90px;
  margin-top: 10px;
}
.bc-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bc-bar { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--border); min-height: 4px; }
.bc-bar.is-now { background: var(--accent); }
.bc-lab { font-size: 10px; color: var(--muted); font-family: var(--mono); }

/* ---------- MINI LISTS / BARS ---------- */
.mini-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.mini-row { display: flex; align-items: center; gap: 10px; }
.mini-name { flex: none; width: 40%; font-size: 12.5px; font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--border); overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.mini-val { flex: none; font-size: 12.5px; font-weight: 800; color: var(--muted-strong); font-variant-numeric: tabular-nums; }

/* ---------- LEADERBOARD ---------- */
.lb-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; overflow: auto; }
.lb-row-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 8px; }
.lb-name { font-size: 13.5px; font-weight: 700; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-val { font-size: 14.5px; font-weight: 900; color: var(--accent-btn); font-variant-numeric: tabular-nums; }
.lb-card { margin-top: clamp(12px, 1.1vw, 22px); }
.lb-list.is-full .lb-row { padding: 8px 10px; border-radius: 8px; }
.lb-list.is-full .lb-row.is-zebra { background: var(--surface-tint); }
.lb-rank { flex: none; font-size: 11.5px; font-weight: 800; color: var(--muted); width: 20px; }
.lb-rate { flex: none; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- FEED ---------- */
.feed-block { gap: 0; }
.feed-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; overflow: auto; }
.feed-row { display: flex; gap: 10px; align-items: flex-start; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.feed-body { min-width: 0; flex: 1; }
.feed-top { display: flex; justify-content: space-between; gap: 8px; }
.feed-title { font-size: 12.5px; font-weight: 750; color: var(--text); }
.feed-time { font-size: 10.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.feed-marke { font-size: 10.5px; font-weight: 700; color: var(--accent-btn); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 1px; }
.feed-text { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

/* ---------- SLA COCKPIT ---------- */
.sla-subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: clamp(16px, 2vw, 24px) 0 20px; }
.sla-tab {
  padding: 8px 14px 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.sla-tab:hover { color: var(--text); background: rgba(15, 181, 174, 0.07); }
.sla-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.stat-row { display: flex; gap: clamp(16px, 2vw, 32px); flex-wrap: wrap; margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-val { font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-lab { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; }

.sla-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(14px, 1.4vw, 24px); align-items: start; }
.sla-table-card { padding: 0; overflow: hidden; }
.sla-table { width: 100%; border-collapse: collapse; font-size: clamp(12px, 0.85vw, 14px); font-variant-numeric: tabular-nums; }
.sla-table th {
  padding: 10px 14px;
  text-align: right;
  font-weight: 750;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-tint);
  white-space: nowrap;
}
.sla-table th:first-child, .sla-table td:first-child { text-align: left; }
.sla-table td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--border); color: var(--text); }
.sla-table tr:last-child td { border-bottom: none; }
.sla-row { cursor: pointer; transition: background 0.14s; }
.sla-row:hover td { background: rgba(13, 31, 42, 0.03); }
.ampel-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.sla-side { display: flex; flex-direction: column; gap: clamp(14px, 1.4vw, 24px); }
.gauge-wrap { display: flex; justify-content: center; padding: 12px 0; }
.gauge {
  --p: 90;
  position: relative;
  width: min(220px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 3.6deg), var(--border) 0);
}
.gauge::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
}
.gauge-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.gauge-pct { font-size: clamp(28px, 4vw, 40px); font-weight: 900; color: var(--accent-btn); line-height: 1; }
.gauge-lab { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: center; }

/* ---------- LEADERBOARD VIEW ---------- */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: clamp(12px, 1.1vw, 20px); margin-top: clamp(16px, 2.4vw, 28px); }
.emp-card {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(13, 31, 42, 0.08);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s;
}
.emp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.emp-card.is-absent { opacity: 0.72; cursor: default; }
.emp-card.is-absent:hover { transform: none; box-shadow: var(--shadow-soft); }
.emp-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.emp-rank {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-tint);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emp-name { flex: 1; font-size: 14px; font-weight: 750; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.emp-status-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.emp-status-lab { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.emp-num { font-size: 28px; font-weight: 900; color: var(--accent-btn); margin-top: 8px; font-variant-numeric: tabular-nums; }
.emp-card.is-absent .emp-num { color: var(--muted); }
.emp-sub-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.emp-sub { font-size: 11.5px; color: var(--muted); }
.emp-delta { font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.emp-delta.is-up { color: var(--ok); }
.emp-delta.is-down { color: var(--danger); }
.emp-spark { display: flex; align-items: flex-end; gap: 3px; height: 24px; margin-top: 10px; }
.emp-spark-bar { flex: 1; background: var(--accent-soft); border-radius: 2px 2px 0 0; min-height: 2px; }
.emp-spark-bar:last-child { background: var(--accent); }

/* ---------- STAT ROW (SLA + Leaderboard) ---------- */

/* ---------- LAGER ---------- */
.lager-kpis { display: flex; gap: clamp(16px, 2vw, 32px); margin: clamp(16px, 2.4vw, 28px) 0 24px; flex-wrap: wrap; }
.lager-kpi { display: flex; flex-direction: column; gap: 2px; }
.lager-kpi-val { font-size: clamp(24px, 2.6vw, 34px); font-weight: 900; color: var(--text); }
.lager-kpi-lab { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; }

.stock-card { padding: 0; overflow: hidden; margin-bottom: clamp(14px, 1.4vw, 24px); }
.stock-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 12px; flex-wrap: wrap; }
.stock-stand { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stock-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}
.stock-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.stock-table th { padding: 8px 20px; text-align: right; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; background: var(--surface-tint); }
.stock-table th:first-child, .stock-table td:first-child { text-align: left; }
.stock-table td { padding: 10px 20px; text-align: right; border-top: 1px solid var(--border); }
.stock-name { font-weight: 650; color: var(--text); }
.stock-artnr { font-size: 11px; color: var(--muted); font-family: var(--mono); }

.lager-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.4vw, 24px); margin-bottom: clamp(14px, 1.4vw, 24px); }
.waw-total { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.waw-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); gap: 10px; }
.waw-count { font-size: 12.5px; font-weight: 800; color: var(--danger); white-space: nowrap; }

.delivery-list { display: flex; flex-direction: column; margin-top: 6px; }
.delivery-row {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
}
.delivery-row:hover { background: var(--surface-tint); }
.delivery-date { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.delivery-lieferant { font-weight: 650; color: var(--text); }
.delivery-brand { color: var(--accent-btn); font-weight: 650; font-size: 11.5px; }
.delivery-count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- LEAD-CAPTURE (shared: Tour-Ende, Exit-Intent, gesperrte Funktionen) ---------- */
.lead-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13, 31, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-backdrop.is-open { display: flex; }
.lead-card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(640px, 88vh);
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: var(--shadow-lift);
}
.lead-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lead-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent-btn); margin-bottom: 10px; }
.lead-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.lead-explain { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.lead-explain:not(:empty) { margin-bottom: 18px; }
.lead-para { margin: 0 0 12px; }
.lead-para:last-child { margin-bottom: 0; }

.lead-form { text-align: left; }
.lead-field { margin-bottom: 12px; }
.lead-label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px; }
.lead-field input[type="email"] {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--text);
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.lead-field input[type="email"]:focus { border-color: var(--accent); outline: none; }
.lead-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 4px 0 14px;
  font-size: 12.5px;
  color: var(--muted-strong);
  line-height: 1.4;
  cursor: pointer;
}
.lead-consent input[type="checkbox"] { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--accent-btn); cursor: pointer; }
.lead-submit {
  width: 100%;
  background: var(--accent-btn);
  color: #fff;
  font-weight: 750;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 9px;
  border: 1px solid var(--accent-btn-deep);
  cursor: pointer;
}
.lead-submit:hover { background: var(--accent-btn-deep); }
.lead-privacy { font-size: 11.5px; color: var(--muted); margin-top: 12px; text-align: center; }
.lead-privacy a { color: var(--accent-btn); text-decoration: underline; }
.lead-secondary-book {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 650;
  color: var(--muted-strong);
  text-decoration: none;
}
.lead-secondary-book:hover { color: var(--accent-btn); }

.lead-done { text-align: center; padding: 4px 0; }
.lead-done-text { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.lead-book {
  display: inline-block;
  background: var(--accent-btn);
  color: #fff;
  font-weight: 750;
  font-size: 14.5px;
  padding: 12px 20px;
  border-radius: 9px;
  border: 1px solid var(--accent-btn-deep);
  text-decoration: none;
}
.lead-book:hover { background: var(--accent-btn-deep); }

/* ---------- CHAT ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: var(--accent-btn);
  border: 1px solid var(--accent-btn-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lift);
}
.chat-fab:hover { background: var(--accent-btn-deep); color: #fff; }

.chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 61;
  width: min(430px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 130px));
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.is-open { display: flex; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.chat-head-title { font-size: 15px; font-weight: 800; }
.chat-badge { font-size: 10.5px; font-weight: 700; color: var(--accent-btn); background: var(--accent-wash); border: 1px solid var(--accent-soft); border-radius: 6px; padding: 3px 8px; margin-top: 4px; display: inline-block; }
.chat-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 18px; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.chat-bubble { max-width: 88%; font-size: 13.5px; line-height: 1.5; }
.chat-bubble-user { align-self: flex-end; background: var(--accent-wash); border: 1px solid var(--accent-soft); border-radius: 14px 14px 4px 14px; padding: 10px 14px; color: var(--text); }
.chat-bubble-assistant { align-self: flex-start; background: var(--surface-tint); border-radius: 14px 14px 14px 4px; padding: 12px 14px; }
.chat-bubble-block { margin-top: 10px; }
.chat-bars { display: flex; flex-direction: column; gap: 8px; }
.chat-bar-row { display: flex; align-items: center; gap: 8px; }
.chat-bar-lab { width: 90px; flex: none; font-size: 11px; color: var(--muted-strong); font-weight: 650; }
.chat-bar-val { width: 20px; flex: none; font-size: 11.5px; font-weight: 800; color: var(--muted-strong); text-align: right; }
.chat-stat-row { display: flex; gap: 16px; }
.chat-stat { display: flex; flex-direction: column; }
.chat-stat-val { font-size: 18px; font-weight: 900; color: var(--accent-btn); }
.chat-stat-lab { font-size: 10.5px; color: var(--muted); }
.chat-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.chat-table th { text-align: left; padding: 4px 6px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.chat-table td { padding: 5px 6px; border-top: 1px solid var(--border); }
.chat-foot { padding: 14px 20px; border-top: 1px solid var(--border); }
.chat-input-row { display: flex; gap: 8px; align-items: center; }
.chat-input {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
}
.chat-refresh {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.chat-refresh:hover { color: var(--accent-btn); border-color: var(--accent); }

/* ---------- TOUR ---------- */
.tour-overlay { position: fixed; inset: 0; z-index: 150; display: none; }
.tour-overlay.is-open { display: block; }
#tour-hole {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(13, 31, 42, 0.72);
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
  pointer-events: none;
  z-index: 151;
}
.tour-tooltip {
  position: fixed;
  z-index: 152;
  width: min(320px, calc(100vw - 24px));
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-lift);
}
/* Fallback, wenn ein Schritt kein sichtbares Ziel hat (z.B. Null-Bounding-Box): Tooltip
   zentriert ohne Spotlight-Loch statt kaputt/verwaist in der Ecke zu haengen. */
.tour-tooltip.is-centered {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
}
.tour-progress { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--accent-btn); margin-bottom: 8px; }
.tour-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.tour-text { font-size: 13px; color: var(--muted); line-height: 1.5; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.tour-skip { background: transparent; border: none; color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.tour-nav-btns { display: flex; gap: 8px; }
.tour-btn { padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.tour-back { background: transparent; border: 1px solid var(--border); color: var(--muted-strong); }
.tour-next { background: var(--accent-btn); border: 1px solid var(--accent-btn-deep); color: #fff; }
.tour-next:hover { background: var(--accent-btn-deep); color: #fff; }

/* ---------- BOTTOM BAR (mobile) ---------- */
.bottom-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.bottom-item.is-active { color: var(--accent-btn); }

/* ---------- MOBIL-SHEET "MEHR" ---------- */
.more-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 170;
  background: rgba(13, 31, 42, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.more-sheet-backdrop.is-open { display: flex; }
.more-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lift);
  padding: 8px 8px calc(14px + env(safe-area-inset-bottom));
}
.more-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
}
.more-sheet-title { font-size: 15px; font-weight: 800; color: var(--text); }
.more-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.more-sheet-list { display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.more-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.more-sheet-item:active { background: var(--surface-tint); }
.more-sheet-item.is-featured {
  background: var(--accent-wash);
  border: 1px solid var(--accent-soft);
  color: var(--accent-btn);
  font-weight: 750;
}
.more-sheet-label { flex: 1; }
.more-sheet-item .nav-lock { margin-left: auto; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .sla-split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .demo-shell { padding-left: 0; }
  .nav-rail { display: none; }
  .bottom-bar { display: flex; }
  .header-home { display: inline-block; }
  .demo-main { padding-bottom: 84px; }
  .dashboard-grid, .dashboard-grid-item { grid-template-columns: 1fr; }
  .dashboard-grid-item { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .lager-grid { grid-template-columns: 1fr; }
  .header-titles .divider { display: none; }
  .stock-table { display: block; overflow-x: auto; white-space: nowrap; }
  .sla-table-wrap, .stock-card { overflow-x: auto; }
  .tour-tooltip { left: 12px !important; right: 12px !important; width: auto; bottom: 20px; top: auto !important; }
  /* Bottom-Bar ist ca. 52-56px hoch (+ Home-Indicator auf Notch-Geraeten) - FAB muss
     komplett darueber sitzen, sonst ueberlappt er den "Mehr"-Button (nicht mehr antippbar). */
  .chat-fab { bottom: calc(56px + env(safe-area-inset-bottom) + 16px); right: 16px; }
  .chat-panel { position: fixed; inset: 0; width: 100%; max-height: 100%; border-radius: 0; bottom: 0; right: 0; }
  .delivery-row { grid-template-columns: 70px 1fr; row-gap: 2px; }
  .delivery-brand, .delivery-count { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  #tour-hole { transition: none; }
}
