/* Instingo Hub — landing & auth styles.
   Brand tokens come straight from instingo.de: green primary, slate ink, and
   four category accents (green/blue/purple/orange). Colour ENCODES category —
   the same four accents run through the pillars and the stat mix, so the page
   reads as one system rather than decorated sections. */

:root {
  --green: #90b72d;
  --green-ink: #243203;
  --green-wash: #f0f5e8;
  --blue: #398bbf;
  --purple: #6b52b5;
  --orange: #f97316;

  --slate: #354860;
  --slate-900: #263442;
  --slate-600: #5a6d7f;
  --slate-400: #9aa7b4;

  --paper: #fbfcfd;
  --surface: #ffffff;
  --line: #e4e9ef;
  --line-soft: #eef2f6;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(38, 52, 66, .05), 0 12px 32px -16px rgba(38, 52, 66, .22);
  --wrap: 1120px;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Guard against any child forcing the page wider than the viewport — the
     body must never scroll sideways, even with long German compound words. */
  overflow-x: hidden;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-ink);
}

/* --- Brand wordmark: the dot is the identity --- */
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -.02em;
  color: var(--slate-900);
}
.brand__dot {
  width: .42em;
  height: .42em;
  border-radius: 50%;
  background: var(--green);
  transform: translateY(-.02em);
}
.brand__sub {
  margin-left: 6px;
  font-weight: 600;
  font-size: .82em;
  color: var(--slate-400);
  letter-spacing: 0;
}
.brand--footer { font-size: 1.1rem; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 253, .82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.site-nav { display: flex; align-items: center; gap: 10px; }
.site-nav__logout { margin: 0; }

/* --- Buttons --- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--slate);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 55%, white);
  outline-offset: 2px;
}
.btn--solid {
  --btn-bg: var(--green);
  --btn-fg: #fff;
  --btn-bd: var(--green);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--green) 70%, transparent);
}
.btn--solid:hover { --btn-bg: #83a827; --btn-bd: #83a827; }
.btn--outline { --btn-bd: var(--line); --btn-fg: var(--slate-900); background: var(--surface); }
.btn--outline:hover { --btn-bd: var(--slate-400); }
.btn--ghost { --btn-fg: var(--slate-600); }
.btn--ghost:hover { --btn-fg: var(--slate-900); background: var(--line-soft); }
.btn--lg { padding: 14px 26px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* --- Hero: the thesis. Oversized, tightly-set headline; the accent clause
   carries the green so the eye lands on "an einem Ort". --- */
.hero { padding: 84px 0 40px; }
.hero__title {
  margin: 0 0 20px;
  max-width: 15ch;
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.03em;
  color: var(--slate-900);
  /* Long compound words (Gesundheitsangebote) must break rather than push the
     layout wider than the screen. */
  overflow-wrap: break-word;
  hyphens: auto;
}
.hero__title-accent {
  display: block;
  color: var(--green);
}
.hero__lede {
  margin: 0 0 30px;
  max-width: 42ch;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--slate-600);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta { margin: 18px 0 0; font-size: .9rem; color: var(--slate-400); }

/* --- Pillars: four cards, one accent each. The tag pill and the top hairline
   both carry --accent, tying label to colour. --- */
.pillars { padding: 40px 0 32px; }
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pillar {
  position: relative;
  padding: 26px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}
.pillar[data-accent="green"]  { --accent: var(--green); }
.pillar[data-accent="blue"]   { --accent: var(--blue); }
.pillar[data-accent="purple"] { --accent: var(--purple); }
.pillar[data-accent="orange"] { --accent: var(--orange); }
.pillar__tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, white);
}
.pillar__title {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--slate-900);
}
.pillar__text { margin: 0; font-size: .95rem; color: var(--slate-600); }

/* --- Preview: stats + category mix, framed as an example --- */
.preview { padding: 48px 0; }
.preview__inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}
.preview__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--slate-900);
}
.preview__text { margin: 0; font-size: 1.05rem; color: var(--slate-600); max-width: 40ch; }

.preview__panel {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--slate-900);
  line-height: 1;
}
.stat__unit { font-size: .55em; font-weight: 700; color: var(--slate-400); margin-left: 1px; }
.stat__label { font-size: .82rem; font-weight: 600; color: var(--slate-400); }

.mix__caption {
  margin: 0 0 14px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-400);
}
.mix__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mix__item {
  display: grid;
  grid-template-columns: 9.5rem 1fr auto;
  align-items: center;
  gap: 12px;
}
.mix__item[data-accent="green"]  { --accent: var(--green); }
.mix__item[data-accent="blue"]   { --accent: var(--blue); }
.mix__item[data-accent="purple"] { --accent: var(--purple); }
.mix__item[data-accent="orange"] { --accent: var(--orange); }
.mix__label { font-size: .92rem; font-weight: 600; color: var(--slate); }
.mix__bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.mix__fill {
  display: block;
  height: 100%;
  width: var(--pct);
  border-radius: 999px;
  background: var(--accent);
  transform-origin: left;
  animation: grow-bar .9s cubic-bezier(.2, .7, .2, 1) both;
}
.mix__pct { font-size: .88rem; font-weight: 700; color: var(--slate-900); font-variant-numeric: tabular-nums; }

@keyframes grow-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --- Logo carousel: seamless marquee band --- */
.logos {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logos__cap {
  margin: 0 0 24px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--slate-400);
  text-align: center;
}
.logos__track {
  display: flex;
  gap: 16px;
  animation: logo-marquee 28s linear infinite;
  animation-play-state: running;
}
.logos__track:hover {
  animation-play-state: paused;
}
.logos__item {
  flex-shrink: 0;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--line-soft);
  color: var(--slate-400);
  font-size: .9rem;
  font-weight: 500;
  text-align: center;
  min-width: max-content;
}
@keyframes logo-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* --- Closing CTA --- */
.cta { padding: 20px 0 88px; }
.cta__inner {
  padding: 48px 40px;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% 0%, var(--green-wash) 0%, transparent 62%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}
.cta__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--slate-900);
}
.cta__text { margin: 0 auto 24px; max-width: 46ch; font-size: 1.05rem; color: var(--slate-600); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* --- Auth --- */
.page-auth main { display: flex; }
.auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  min-height: calc(100vh - 68px - 220px);
}
.auth__card {
  width: 100%;
  max-width: 400px;
  padding: 36px 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.auth__title { margin: 0 0 6px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--slate-900); }
.auth__lede { margin: 0 0 24px; color: var(--slate-600); font-size: .98rem; }
.auth__error {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid #f3c4c4;
  color: #b42318;
  font-size: .9rem;
}
.auth__form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-size: .86rem; font-weight: 600; color: var(--slate); }
.field__input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 1rem;
  color: var(--slate-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
  background: var(--surface);
}
.auth__aside { margin: 22px 0 0; font-size: .9rem; color: var(--slate-400); text-align: center; }
.auth__aside a { color: var(--green-ink); font-weight: 600; }

/* --- Dashboard placeholder --- */
.page-dashboard main { display: flex; }
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 68px - 220px);
  padding: 56px 0;
}
.stage__title {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--slate-900);
}
.stage__text { margin: 0 0 28px; max-width: 48ch; font-size: 1.1rem; color: var(--slate-600); }
.stage__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.stage__actions form { margin: 0; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 30px;
}
.site-footer__note { margin: 0; font-size: .9rem; color: var(--slate-400); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer__links a { font-size: .9rem; color: var(--slate-600); text-decoration: none; }
.site-footer__links a:hover { color: var(--green-ink); text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .pillars__grid { grid-template-columns: repeat(2, 1fr); }
  .preview__inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .hero { padding: 56px 0 28px; }
  .pillars__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .mix__item { grid-template-columns: 7rem 1fr auto; gap: 8px; }
  .cta__inner { padding: 36px 22px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover { transform: none; }
  .logos__track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* dashboard app shell — the dark nav rail carries the brand mark and
   sign-out control now, so the marketing site-header/footer chrome would
   just be redundant white bars sandwiching the app; hide both here. */
.page-dashboard-app main { display: block; }
.page-dashboard-app .site-header,
.page-dashboard-app .site-footer { display: none; }

.dash {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: start;
  min-height: calc(100vh - 68px - 90px);
}

.dash__nav {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  padding: 22px 14px 28px;
  background: var(--slate-900);
  border-right: 1px solid var(--slate-900);
}
.dash__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 10px 22px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.dash__brand .brand__dot { background: var(--green); }
.dash__navgrp {
  margin: 18px 10px 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, #fff 38%, transparent);
}
.dash__navgrp:first-child { margin-top: 4px; }
.dash__ni {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: color-mix(in srgb, #fff 68%, transparent);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.dash__ni::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  flex: none;
}
.dash__ni:hover { background: color-mix(in srgb, #fff 8%, transparent); color: #fff; }
.dash__ni.is-on {
  background: color-mix(in srgb, var(--green) 22%, transparent);
  color: #fff;
}
.dash__ni.is-on::before { background: var(--green); opacity: 1; }

.dash__navfoot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
}
.dash__navfoot form { margin: 0; }
.dash__ni--logout {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash__main { padding: 22px 28px 40px; min-width: 0; background: var(--paper); }
.dash__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.dash__h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--slate-900);
}
.dash__chip {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--green-ink);
  font-size: .82rem;
  font-weight: 700;
}

/* --- KPI tiles ---
   One hero tile (the headline metric) carries real weight — dark fill,
   large number. The rest stay quiet: same card, no per-tile colour
   coding. Hierarchy comes from that single contrast, not from striping
   every tile a different colour. */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.kpi {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kpi--hero {
  background: var(--slate-900);
  border-color: var(--slate-900);
}
.kpi--hero .kpi__v { color: #fff; }
.kpi--hero .kpi__l { color: color-mix(in srgb, #fff 55%, transparent); }
.kpi__v {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--slate-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__l {
  font-size: .78rem;
  font-weight: 600;
  color: var(--slate-400);
}
.kpi__d {
  align-self: flex-start;
  margin-top: 1px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
}
.kpi__d.up { background: var(--green-wash); color: var(--green-ink); }
.kpi__d.dn { background: #fef2f2; color: #b42318; }

/* --- Charts ---
   Real chart anatomy: thin marks, hairline axis/gridlines, direct value
   labels, a hover tooltip, and a table-view twin for every chart (the
   accessibility contract — no value is ever gated behind hover alone). */
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.chart-toggle {
  border: none;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--slate-400);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.chart-toggle:hover { color: var(--slate-900); }
.chart-table { display: none; }
.chart-table.is-on { display: block; }
.chart-body.is-off { display: none; }

/* Column chart (Teilnahmen · letzte 30 Tage) */
.col-chart {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding-top: 8px;
}
.col-chart__axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 160px;
  padding-bottom: 20px; /* matches the x-axis label band below the plot */
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  color: var(--slate-400);
  text-align: right;
}
.col-chart__plot {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-bottom: 20px;
  border-left: 1px solid var(--line-soft);
}
.col-chart__grid {
  position: absolute;
  inset: 0 0 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.col-chart__gridline { border-top: 1px solid var(--line-soft); }
.col-chart__bar {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}
.col-chart__fill {
  width: 100%;
  max-width: 22px;
  height: var(--h);
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--green);
}
.col-chart__bar:hover .col-chart__fill { background: var(--green-ink); }
.col-chart__label {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  font-size: .68rem;
  color: var(--slate-400);
  text-align: center;
}

/* Horizontal bar chart (Verteilung nach Kategorie) */
.bar-chart { display: grid; gap: 10px; padding-top: 4px; }
.bar-chart__row { display: grid; grid-template-columns: 9.5rem 1fr auto; align-items: center; gap: 12px; }
.bar-chart__label { font-size: .88rem; font-weight: 600; color: var(--slate); }
.bar-chart__track { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar-chart__fill {
  display: block;
  height: 100%;
  width: var(--pct);
  border-radius: 999px;
  background: var(--accent);
}
.bar-chart__row[data-accent="green"]  .bar-chart__fill { --accent: var(--green); }
.bar-chart__row[data-accent="blue"]   .bar-chart__fill { --accent: var(--blue); }
.bar-chart__row[data-accent="purple"] .bar-chart__fill { --accent: var(--purple); }
.bar-chart__row[data-accent="orange"] .bar-chart__fill { --accent: var(--orange); }
.bar-chart__pct { font-size: .88rem; font-weight: 700; color: var(--slate-900); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }

/* Hover tooltip (shared by both chart types) */
.chart-tip {
  position: fixed;
  z-index: 40;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--slate-900);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity .1s ease;
}
.chart-tip.is-on { opacity: 1; }

/* --- Maßnahme-detail header --- */
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.detail-head__title { margin: 0 0 6px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--slate-900); }
.detail-head__meta { margin: 0; font-size: .92rem; color: var(--slate-600); }

/* --- Status badges (Programm-Lebenszyklus) --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge--planned { background: var(--line-soft); color: var(--slate-600); }
.status-badge--running { background: var(--green-wash); color: var(--green-ink); }
.status-badge--completed {
  background: color-mix(in srgb, var(--blue) 14%, white);
  color: var(--blue);
}
.status-badge--registered { background: var(--line-soft); color: var(--slate-600); }
.status-badge--attended { background: var(--green-wash); color: var(--green-ink); }
.status-badge--cancelled {
  background: color-mix(in srgb, var(--orange) 14%, white);
  color: var(--orange);
}
.status-badge--open { background: var(--line-soft); color: var(--slate-600); }
.status-badge--decided { background: var(--green-wash); color: var(--green-ink); }
.status-badge--discarded {
  background: color-mix(in srgb, var(--orange) 14%, white);
  color: var(--orange);
}
.status-badge--proposed { background: var(--line-soft); color: var(--slate-600); }
.status-badge--approved { background: var(--green-wash); color: var(--green-ink); }
.status-badge--declined {
  background: color-mix(in srgb, var(--orange) 14%, white);
  color: var(--orange);
}
.status-badge--ok { background: var(--green-wash); color: var(--green-ink); }
.status-badge--error {
  background: color-mix(in srgb, var(--orange) 14%, white);
  color: var(--orange);
}

/* --- Dashboard table --- */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-table th,
.dash-table td {
  padding: 8px 14px;
  text-align: left;
  font-size: .86rem;
  border-bottom: 1px solid var(--line-soft);
}
.dash-table th {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--slate-600);
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
}
.dash-table td { color: var(--slate); }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--line-soft); }
.dash-table tr:has(.dash-empty):hover td { background: none; }
.dash-table td.dash-empty {
  padding: 22px 4px;
  text-align: center;
  color: var(--slate-400);
  font-size: .88rem;
}

/* --- Connector picker row-list --- */
.connector-list { display: flex; flex-direction: column; }
.connector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
}
.connector-row:last-child { border-bottom: none; }
.connector-row:hover { background: var(--line-soft); }
.connector-row__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.connector-row__title { display: flex; align-items: center; gap: 10px; }
.connector-row__name { font-weight: 700; color: var(--slate-900); }
.connector-row__desc { font-size: .86rem; color: var(--slate-600); }
.connector-row__chevron { color: var(--slate-400); font-size: 1.2rem; flex-shrink: 0; }

/* --- Connector setup page --- */
.connector-setup__desc { color: var(--slate-600); margin: -4px 0 16px; }
.field-error { color: var(--orange); font-size: .82rem; margin-top: 4px; }
.kv-list { margin: 0 0 16px; }
.kv-list dt {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-top: 12px;
}
.kv-list dt:first-child { margin-top: 0; }
.kv-list dd { margin: 4px 0 0; }
.kv-list code {
  display: inline-block;
  padding: 6px 10px;
  background: var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: .86rem;
  word-break: break-all;
}

/* --- Layout helpers for KPI page sections --- */
.dash-panel {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.dash-panel__title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-400);
}
.dash-grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-grid-2 .dash-panel { margin-bottom: 0; }

/* --- Dashboard filter + pagination controls --- */
.dash-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.dash-filter label {
  font-size: .86rem;
  font-weight: 600;
  color: var(--slate-600);
}
.dash-filter select,
.dash-filter input[type="text"] {
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: .88rem;
  color: var(--slate-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dash-filter select { cursor: pointer; }
.dash-filter select:hover,
.dash-filter input[type="text"]:hover {
  border-color: var(--slate-400);
}
.dash-filter select:focus,
.dash-filter input[type="text"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
.dash-filter button {
  --btn-bd: var(--line);
  --btn-fg: var(--slate-900);
  background: var(--surface);
}
.dash-filter button:hover {
  --btn-bd: var(--slate-400);
}

/* --- Bid form (Initiative "Add a bid" stepped flow) --- */
/* Collapsed bar: the form stays out of the way until asked for, so the
   comparison table -- the reason the page exists -- keeps the top slot. */
.bidbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bidbar__title { margin: 0; font-size: .95rem; font-weight: 700; }
.bidbar__sub { margin: 2px 0 0; font-size: .84rem; color: var(--slate-600); }

.bid__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.bid__q { margin: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.bid__editmark {
  display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 999px;
  background: var(--green-wash); color: var(--green-ink); font-size: .7rem;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 3px;
}
.bid__dots {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--slate-400);
}
.bid__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line);
  transition: background .2s ease, transform .2s ease;
}
.bid__dot--on { background: var(--green); transform: scale(1.25); }
.bid__dot--done { background: var(--green); opacity: .45; }

.bid-step { animation: bid-slide .22s ease both; }
@keyframes bid-slide {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.bid-field { margin-bottom: 12px; }
.bid-field label {
  display: block; margin-bottom: 4px;
  font-size: .86rem; font-weight: 600; color: var(--slate-600);
}
.bid-form input[type="text"],
.bid-form input[type="number"],
.bid-form input[type="date"],
.bid-form input[type="email"],
.bid-form input[type="tel"],
.bid-form select {
  width: 100%; padding: 8px 11px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: .9rem; color: var(--slate-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bid-form select { cursor: pointer; }
.bid-form input:hover, .bid-form select:hover { border-color: var(--slate-400); }
.bid-form input:focus, .bid-form select:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
.bid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bid-hint { margin: 4px 0 0; font-size: .78rem; color: var(--slate-400); }

/* Category pills: four options is below the threshold where a <select>
   earns its keep. The real <select> stays in the DOM as the form input and
   the no-JS fallback; Alpine hides it once it takes over. */
.bid-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.bid-pill {
  padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); font: inherit; font-size: .86rem; font-weight: 600;
  color: var(--slate-600); cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.bid-pill:hover { border-color: var(--slate-400); }
.bid-pill--on { background: var(--green-wash); border-color: var(--green); color: var(--green-ink); }
.bid-pill:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
/* With Alpine up, the pills are the control and the select is redundant. */
[x-cloak] { display: none !important; }
.bid-pills:not([x-cloak]) ~ .bid-select { display: none; }

.bid-acts {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.bid-acts__spacer { flex: 1; }
.bid-nochange { font-size: .8rem; color: var(--slate-400); }
.btn--quiet { border-color: transparent; background: none; color: var(--slate-600); }
.btn--quiet:hover { border-color: var(--line); color: var(--slate-900); }
.bid-acts .btn:disabled { opacity: .4; cursor: not-allowed; }

/* The signature: the bid being typed, previewed as a real table row. */
tr.bid-ghost td {
  background: var(--green-wash); color: var(--green-ink);
  border-bottom: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}
tr.bid-ghost td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.bid-ghost:hover td { background: var(--green-wash); }
.bid-ghost__empty { color: var(--slate-400); font-style: italic; }
.bid-ghost__hint { font-size: .78rem; color: var(--slate-400); }
.bid-ghost__flag {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: .7rem; font-weight: 700;
  letter-spacing: .03em; vertical-align: 1px;
}

/* Per-row actions: quiet until hover, so they don't compete with the data. */
.row-acts { text-align: right; white-space: nowrap; }
.row-acts__form { display: inline; }
.btn-mini {
  background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 3px 10px; font: inherit; font-size: .78rem; font-weight: 600;
  color: var(--slate-600); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn-mini:hover { border-color: var(--line); background: var(--surface); color: var(--slate-900); }
.btn-mini--del:hover { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 40%, transparent); }
.btn-mini:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

/* --- Invite link shown in the managers table --- */
/* Shown so a failed or spam-filtered invite email doesn't strand the invite:
   the link can be copied straight out of the row. */
.invite-link {
  display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle; white-space: nowrap;
  padding: 3px 8px; margin-right: 8px;
  background: var(--line-soft); border-radius: var(--radius-sm);
  font-size: .74rem; color: var(--slate-600);
}

/* --- Approvals queue --- */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: .7rem; font-weight: 700; text-align: center;
}
.approval {
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.approval:last-child { border-bottom: none; }
.approval__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.approval__what { margin: 0; font-size: .95rem; color: var(--slate-900); }
.approval__target { color: var(--slate-600); }
.approval__target::before { content: "· "; color: var(--slate-400); }
.approval__who { margin: 2px 0 0; font-size: .8rem; color: var(--slate-400); }
.approval__reason { margin: 8px 0 0; font-size: .88rem; color: var(--slate-600); max-width: 68ch; }
.approval__blocked { margin: 10px 0 0; font-size: .84rem; color: var(--slate-400); font-style: italic; }
.approval__form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.approval__form input {
  flex: 1 1 240px; min-width: 0; padding: 7px 10px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: .88rem; color: var(--slate-900);
}
.approval__form input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
/* A self-approval must never read as a decision two people reviewed. */
.approval__self {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  color: var(--orange); font-size: .68rem; font-weight: 700; white-space: nowrap;
}

/* --- Challenge stats: rendered from a payload the hub doesn't interpret --- */
.stats-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 4px;
}
.stats-period { margin: 0 0 12px; font-size: .86rem; color: var(--slate-600); }
.stats-meta { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.stats-updated { font-size: .78rem; color: var(--slate-400); }
.stats-group-label { margin-top: 18px; }
.kpi__unit { font-size: .55em; font-weight: 700; color: var(--slate-400); }
.stats-breakdown { margin-bottom: 4px; }
@media (max-width: 760px) {
  .stats-head { flex-direction: column; }
}

/* --- Backlink: a return path is navigation, not a full-width card --- */
.backlink {
  display: inline-block;
  margin: 0 0 12px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
}
.backlink:hover { color: var(--slate-900); text-decoration: underline; }
.backlink:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--green) 60%, white);
  outline-offset: 2px; border-radius: 3px;
}

/* --- Page lede: title + one plain-language line explaining the page --- */
.page-lede__title {
  margin: 0 0 6px;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--slate-900);
}
.page-lede__text {
  margin: 0 0 18px; max-width: 68ch;
  font-size: .95rem; color: var(--slate-600);
}

/* A panel title that sits in a flex header already providing its spacing. */
.dash-panel__title--bare { margin: 0; padding: 0; border: 0; }

/* --- Connector picker: what differs is the setup cost, so say that --- */
.connector-row__meta {
  display: block; margin-top: 4px;
  font-size: .78rem; color: var(--slate-400);
}

/* --- Connector setup --- */
.setup-form { max-width: 520px; }
.setup-form__actions { margin-top: 4px; }
/* Shown once and unrecoverable, so it gets its own callout. */
.secret-note {
  margin: 0 0 16px; padding: 12px 14px;
  border: 1.5px solid color-mix(in srgb, var(--orange) 40%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--orange) 5%, transparent);
}
.secret-note__label {
  margin: 0 0 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate-400);
}
.secret-note__value {
  display: inline-block; padding: 6px 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .86rem; word-break: break-all;
}
.secret-note__warn { margin: 8px 0 0; font-size: .8rem; color: var(--orange); font-weight: 600; }

/* --- Row link: the name IS the link, no separate View column --- */
/* Underline on hover only: a whole column of underlined text reads as noise,
   but the pointer + underline on approach makes the affordance obvious. */
.row-link {
  color: var(--slate-900);
  font-weight: 600;
  text-decoration: none;
}
.row-link:hover { color: var(--green-ink); text-decoration: underline; }
.row-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--green) 60%, white);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Type-to-confirm for destructive actions --- */
/* Orange, not red: this palette has no red, and orange is already the
   warning accent. No filled panic-panel -- the friction is the typing. */
.danger {
  padding: 14px 16px;
  border: 1.5px solid color-mix(in srgb, var(--orange) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--orange) 5%, transparent);
}
.danger__what { margin: 0 0 10px; font-size: .9rem; color: var(--slate-900); max-width: 62ch; }
.danger label { display: block; margin-bottom: 6px; font-size: .86rem; color: var(--slate-600); }
.danger label strong { color: var(--slate-900); }
.danger__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.danger__row input {
  flex: 1 1 220px; min-width: 0; padding: 8px 11px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: .9rem; color: var(--slate-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.danger__row input:hover { border-color: var(--slate-400); }
.danger__row input:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent);
}
.btn--danger {
  --btn-bg: var(--orange); --btn-fg: #fff; --btn-bd: var(--orange);
}
.btn--danger:hover { --btn-bg: #e0670f; --btn-bd: #e0670f; }
.btn--danger:disabled {
  opacity: .4; cursor: not-allowed; transform: none;
}
.btn--danger:disabled:hover { --btn-bg: var(--orange); transform: none; }
/* The confirmation takes over the row rather than cramming a field into a cell. */
.danger-row td { background: color-mix(in srgb, var(--orange) 4%, transparent); }
.danger-row:hover td { background: color-mix(in srgb, var(--orange) 4%, transparent); }

/* --- Initiative brief: the criteria bids get judged against --- */
.brief { margin: 0 0 14px; }
.brief__goal {
  margin: 0 0 12px; color: var(--slate-600); font-size: .92rem; line-height: 1.55;
  max-width: 68ch;
}
.brief__facts { display: flex; flex-wrap: wrap; gap: 22px; margin: 0; }
.brief__facts dt {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--slate-400);
}
.brief__facts dd { margin: 2px 0 0; font-size: .95rem; font-weight: 600; color: var(--slate-900); }

/* Advisory, not a blocker: mark it, don't hide it. */
.over-budget {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  color: var(--orange); font-size: .7rem; font-weight: 700; white-space: nowrap;
}

.bid-form textarea {
  width: 100%; padding: 8px 11px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: inherit; font-size: .9rem; color: var(--slate-900);
  line-height: 1.5; resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bid-form textarea:hover { border-color: var(--slate-400); }
.bid-form textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.currency-input {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.currency-input:hover { border-color: var(--slate-400); }
.currency-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}
.currency-input__prefix { padding: 8px 0 8px 11px; font-size: .9rem; color: var(--slate-400); }
.currency-input input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dash-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.dash-inline-form input[type="text"] {
  padding: 6px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: .92rem;
  color: var(--slate-900);
  min-width: 14ch;
}
.dash-inline-form input[type="text"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--slate-600);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}

.location-edit summary {
  cursor: pointer;
  list-style: none;
}
.location-edit summary::-webkit-details-marker { display: none; }
.location-edit summary:hover .tag { background: var(--line); }
.location-edit__form {
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.location-edit__option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: var(--slate);
  font-weight: 500;
}

/* Dashboard-scoped compact button size — the marketing page keeps the
   larger default .btn; the console needs a tighter control size to match
   its denser table/panel rhythm. */
.dash__main .btn {
  padding: 6px 14px;
  font-size: .88rem;
}

.dash-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.dash-pagination span {
  font-size: .9rem;
  color: var(--slate-600);
  flex: 1;
  text-align: center;
}
.dash-pagination a {
  --btn-bd: var(--line);
  --btn-fg: var(--slate-900);
}
.dash-pagination a:hover {
  --btn-bd: var(--slate-400);
}

/* --- Kalender (Firmenkalender) ---
   Quiet grid: hairline dividers, no boxed cell borders. Today gets a small
   underline, not a filled circle. Entries are a colored dot + text, not a
   filled chip — status reads through dot intensity, not a separate badge,
   so cell density stays readable at calendar scale. */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 20px;
}
.cal-nav__label {
  margin: 0;
  min-width: 12ch;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
}
.cal-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--slate-400);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.cal-nav__link:hover { background: var(--line-soft); color: var(--slate-900); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}
.cal-grid__head {
  padding: 8px 10px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-400);
  text-align: left;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.cal-day {
  min-height: 96px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.cal-day--out { background: var(--paper); }
.cal-day--out .cal-day__num { color: var(--slate-400); }
.cal-day__num {
  font-size: .84rem;
  font-weight: 600;
  color: var(--slate);
}
/* Today: set by a data attribute in the template, not per-request JS.
   A small underline reads as "today" without a filled dot/circle. */
.cal-day--today .cal-day__num {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--green);
  color: var(--slate-900);
}

.cal-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  color: var(--slate);
  overflow: hidden;
  text-decoration: none;
}
a.cal-entry { cursor: pointer; border-radius: 4px; }
a.cal-entry:hover { background: var(--line-soft); }
a.cal-entry:hover .cal-entry__title { color: var(--slate-900); }
.cal-entry__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--slate-400);
}
.cal-entry__dot[data-accent="movement"] { background: var(--green); }
.cal-entry__dot[data-accent="nutrition"] { background: var(--blue); }
.cal-entry__dot[data-accent="prevention"] { background: var(--purple); }
.cal-entry__dot[data-accent="mental_health"] { background: var(--orange); }
.cal-entry--full .cal-entry__dot { background: var(--slate-400) !important; }
.cal-entry--full .cal-entry__title { color: var(--slate-400); }
.cal-entry__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .cal-grid__head:nth-child(n+6),
  .cal-day:nth-child(7n),
  .cal-day:nth-child(7n-1) {
    display: none; /* hide Sa/So columns on narrow screens rather than
                       cramming a 7-col grid below 760px */
  }
  .cal-grid { grid-template-columns: repeat(5, 1fr); }
}

/* --- Responsive: sidebar collapses under 760px --- */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .bid-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .dash { grid-template-columns: 1fr; }
  .dash__nav {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border-right: none;
    padding: 14px 16px;
  }
  .dash__brand { width: 100%; margin: 0 10px 10px; }
  .dash__navgrp { display: none; }
  .dash__ni { padding: 8px 12px; font-size: .88rem; }
  .dash__navfoot {
    margin: 0;
    padding: 0;
    border-top: none;
  }
  .dash__ni--logout { width: auto; }
  .dash__main { padding: 24px 18px 48px; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
