/* 05 Cockpit: Calls & Umsatz zum Anklicken. Tokens aus lunet.css, Präfix ck-.
   Ohne Skript steht der Startzustand fertig da, die Knöpfe tun dann nichts. */

.ck-demo { container-type: inline-size; }

/* ── Kennzahlen ────────────────────────────────────────────────────── */

.ck-zahlen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
@container (min-width: 470px) {
  .ck-zahlen { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); }
}
.ck-zahl {
  min-width: 0;
  padding: 12px 12px 11px;
  border-radius: 16px;
  background: var(--tile);
}
.ck-zahl dt {
  font-size: 12px;
  line-height: 1.3;
  color: var(--mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-zahl dd { margin: 0; }
.ck-zahl b {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
@container (min-width: 470px) {
  .ck-zahl b { font-size: 22px; }
}
.ck-unter {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--mid);
  white-space: nowrap;
}

/* ── Monatsziel ────────────────────────────────────────────────────── */

.ck-ziel {
  margin-top: 8px;
  padding: 13px 14px 14px;
  border-radius: 16px;
  background: var(--tile);
}
.ck-ziel-zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--ink-2);
}
.ck-ziel-zeile b { font-weight: 500; color: var(--ink); }
.ck-ziel-prozent { margin-left: 4px; color: var(--mid); }

.ck-leiste {
  display: block;
  height: 8px;
  margin-top: 10px;
  border-radius: 4px;
  background: var(--fill);
  overflow: hidden;
}
.ck-leiste.klein { height: 5px; margin-top: 6px; border-radius: 3px; }
.ck-leiste i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transform-origin: left center;
  transition: transform 600ms var(--ease-out);
}
.ck-leiste i.ck-gruen { background: var(--pos); }

/* Startzustand ohne Skript. Das Skript setzt danach dieselben Werte selbst. */
[data-ck-balken="ziel"] { transform: scaleX(0.6267); }
[data-ck-balken="bewerbungen"] { transform: none; }
[data-ck-balken="termine"] { transform: scaleX(0.561); }
[data-ck-balken="erschienen"] { transform: scaleX(0.3902); }
[data-ck-balken="closed"] { transform: scaleX(0.1951); }

/* ── Calls ─────────────────────────────────────────────────────────── */

.ck-calls { margin-top: 16px; }
.ck-titel { margin: 0 0 8px; color: var(--mid); }

.ck-liste { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.ck-call {
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  background: var(--tile);
}
.ck-call-kopf { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ck-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.ck-temp {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.ck-temp[data-temp="heiss"] { background: var(--rot-soft); color: var(--rot); }
.ck-temp[data-temp="kalt"] { color: var(--blau); }

/* Status-Marke: feste Mindestbreite, damit beim Umschalten nichts springt */
.ck-marke {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  min-width: 104px;
  height: 24px;
  margin-left: auto;
  padding-inline: 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--mid);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ck-marke svg { display: none; width: 13px; height: 13px; flex: none; }
.ck-marke[data-art="erschienen"] { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.ck-marke[data-art="closed"] { background: var(--pos-soft); color: var(--pos); box-shadow: none; }
.ck-marke[data-art="closed"] svg { display: block; }
.ck-marke[data-art="nicht"] { background: var(--fill); color: var(--ink-2); box-shadow: none; }

.ck-call-info {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--mid);
}

.ck-knoepfe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.ck-knopf {
  height: 40px;
  min-width: 0;
  padding-inline: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out);
}
.ck-knopf:active { transform: scale(0.97); }
.ck-knopf[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.ck-knopf[data-ck-setzen="closed"][aria-pressed="true"] { background: var(--pos); }
@media (hover: hover) and (pointer: fine) {
  .ck-knopf:hover:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1px var(--faint); }
}
@container (max-width: 340px) {
  .ck-knopf { padding-inline: 4px; font-size: 13px; letter-spacing: -0.02em; }
  .ck-call { padding: 11px 10px; }
}

/* ── Trichter ──────────────────────────────────────────────────────── */

.ck-trichter { margin-top: 16px; }
.ck-stufen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ck-stufe { min-width: 0; }
.ck-stufe-name {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  color: var(--mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-stufe b {
  display: block;
  margin-top: 2px;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
@container (max-width: 340px) {
  .ck-stufen { gap: 6px; }
  .ck-stufe-name { font-size: 11.5px; letter-spacing: -0.01em; }
}

/* ── Fuß ───────────────────────────────────────────────────────────── */

.ck-fuss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 16px;
}
.ck-hinweis {
  flex: 1 1 220px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--mid);
}
.ck-reset {
  display: none;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
}
.ck-an .ck-reset { display: inline-flex; }
.ck-reset:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .ck-reset:hover { color: var(--ink); text-decoration-color: currentColor; }
}

/* ── Toast ─────────────────────────────────────────────────────────── */

/* Klebt am unteren Fensterrand, solange die Demo im Bild ist. Sonst läge er bei
   einer langen Demo (Handy: fast 1900px) weit unter dem Knopf, den man gerade gedrückt hat.
   Der negative Rand nimmt ihm den Platz im Fluss, in Ruhe liegt er über dem Fuß. */
.ck-toast {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  margin: -48px -8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 6px 6px 6px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 14px 30px -14px rgb(11 11 10 / 0.5);
  font-size: 14px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  visibility: hidden;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s linear 150ms;
}
.ck-toast.ck-da {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out), visibility 0s;
}
.ck-toast-text { min-width: 0; font-variant-numeric: tabular-nums; }
.ck-toast-zurueck {
  flex: none;
  height: 36px;
  padding-inline: 14px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.13);
  color: var(--on-ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 140ms var(--ease-out);
}
.ck-toast-zurueck:active { transform: scale(0.97); }
.ck-toast :focus-visible { outline-color: var(--on-ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .ck-toast-zurueck:hover { background: rgb(255 255 255 / 0.2); }
}

/* ── Reduzierte Bewegung: nichts bewegt sich, nur Überblenden ────────── */

@media (prefers-reduced-motion: reduce) {
  .ck-knopf, .ck-reset, .ck-toast-zurueck { transition: none; }
  .ck-knopf:active, .ck-reset:active, .ck-toast-zurueck:active { transform: none; }
  .ck-leiste i { transition: none; }
  .ck-toast, .ck-toast.ck-da { transform: none; }
}

/* Hinweis zum Ausprobieren: verschwindet, sobald Lena nicht mehr offen ist */
.ck-tipp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: opacity 250ms ease;
}
.ck-tipp-punkt {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 0 3px var(--pos-soft);
  animation: ck-tipp-puls 1.8s ease-in-out infinite;
}
@keyframes ck-tipp-puls { 50% { box-shadow: 0 0 0 6px rgb(29 122 76 / 0.08); } }
.ck-demo:has([data-name="Lena K."]:not([data-status="offen"])) .ck-tipp { opacity: 0.35; }
@media (prefers-reduced-motion: reduce) { .ck-tipp-punkt { animation: none; } }
