/* --- Dashboard (home) --- */
.dashboard {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

/* --- Übersicht: a figure and the window it holds for --- */
#uebersicht-body {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.kennzahl-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 0.8rem;
}

.kennzahl {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.kennzahl__label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

.kennzahl__wert {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.kennzahl__leer {
  color: var(--text-dim);
}

/* The window sits under the value rather than beside it, because it qualifies
   the value and a reader who stops at the first line has read the wrong thing. */
.kennzahl__fenster {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.kennzahl__rest {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.kennzahl__rest-grund {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  line-height: 1.4;
}

.verlauf {
  display: grid;
  gap: 0.15rem;
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 0.7rem;
}

.verlauf__zeile {
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto;
  gap: 0.15rem 0.8rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.verlauf__zeit {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Not wrapped: the dot is part of the sentence, and letting it break onto its
   own line leaves a coloured speck above the words it qualifies. A long
   sentence wraps inside itself instead. */
.verlauf__was {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.verlauf__satz {
  font-size: 0.88rem;
  min-width: 0;
}

/* The deed as a dot rather than a badge. Three of the six verbs earn a colour;
   the rest are things kontor could not read off the request, and a grey dot
   says that without dressing it up. */
.verlauf__punkt {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
  align-self: center;
}

.verlauf__punkt--pos {
  background: var(--pos);
}

.verlauf__punkt--neg {
  background: var(--neg);
}

.verlauf__punkt--brass {
  background: var(--brass);
}

/* The trailing word of the path where kontor has no wording for it. Shown as it
   stands, because inventing a sentence for an operation nobody has named would
   put a guess in an audit trail. */
.verlauf__zusatz {
  font-size: 0.74rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

/* Truncated rather than wrapped: `Wiebke und Wolfgang Boden Gedächtnis gGmbH`
   would otherwise take more room than the deed it qualifies. The full name is
   the element's title. */
.verlauf__wo {
  font-size: 0.74rem;
  color: var(--text-faint);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7rem;
}

@media (max-width: 46rem) {
  .verlauf__zeile {
    grid-template-columns: 1fr minmax(0, auto);
  }

  .verlauf__was {
    grid-column: 1 / -1;
    order: 3;
  }
}

.aufgaben {
  display: grid;
  gap: 0.4rem;
}

/* A row that leads somewhere is a button; one that does not is a div. The
   affordance is the element, not a chevron welded to the end of a div. */
.aufgabe {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font: inherit;
  color: inherit;
  text-align: left;
}

button.aufgabe {
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}

button.aufgabe:hover {
  border-color: var(--line);
  background: var(--surface);
}

.aufgabe__zahl {
  flex: 0 0 4.5rem;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* A basis wide enough that the marke wraps to its own line instead of
   crowding a label that already had to break. */
.aufgabe__text {
  flex: 1 1 14rem;
  min-width: 0;
}

.aufgabe__name {
  line-height: 1.35;
}

.aufgabe__hinweis {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Done and not-checkable both count zero and mean opposite things, so they must
   not look alike. Done recedes; not-checkable recedes further and says why. */
.aufgabe--erledigt .aufgabe__zahl,
.aufgabe--erledigt .aufgabe__name {
  color: var(--text-dim);
}

.aufgabe--unpruefbar .aufgabe__zahl,
.aufgabe--unpruefbar .aufgabe__name {
  color: var(--text-faint);
}

.aufgabe--unpruefbar {
  background: transparent;
  border-color: var(--line);
  border-style: dashed;
}
