.aufgabe__marke {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.ueb-kopf {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

.ueb-luecke-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* --- The back link out of a record --- */
.crumb {
  font: inherit;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.86rem;
  transition: color 120ms ease;
}

.crumb:hover {
  color: var(--brass);
}

/* The panel stacks its own rows with rhythm; the .main grid gap only spaces the
   panels themselves, so without this the action row abuts the table below. */
#benutzer {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

/* The primary action lives in the table toolbar, beside the count, so it stays
   anchored to the table it acts on. Compact to sit level with the search field. */
.dtable__bar .btn {
  flex: none;
  padding: 0.42rem 0.9rem;
  font-size: 0.85rem;
}

.stack {
  display: grid;
  gap: 0.7rem;
}

/* --- Planned-view placeholder --- */
.soon-state {
  display: grid;
  gap: 0.5rem;
  place-items: start;
  max-width: 40rem;
  padding: 2rem 1.5rem;
  background: var(--sunk);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
}

.soon-state__lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-dim);
}

/* --- Benutzer: membership chips --- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.78rem;
  white-space: nowrap;
}

.chip__role {
  width: auto;
  border: 0;
  background: transparent;
  padding: 0 0.1rem;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}

.chip__x {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-faint);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.chip__x:hover {
  color: var(--neg);
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  cursor: pointer;
}

/* The global input rule stretches every control to 100%; a checkbox must stay
   its own size so its label sits beside it, not across the row. */
.check input {
  width: auto;
  flex: none;
  accent-color: var(--brass);
}

/* Field hint — the rule a value must meet, shown under its input. */
.field__hint {
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* The same hint where the value is allowed and costs something: a Kostenbuchung
   the Betriebskostenabrechnung will never read. Faint would hide it. */
.field__hint--warnung {
  color: var(--neg);
}

/* --- Creditor sheet: identity, then what the money did --- */
.sheet-ident {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.sheet-ident__iban {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.sheet-ident__meta {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/*
  One payment on two lines rather than three: the date and the account it left
  from carry the amount on the right, and the purpose sits under them. The
  purpose is the part that identifies a firm, so it gets the width.
*/
.zahlung {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.zahlung:last-child {
  border-bottom: 0;
}

.zahlung__when {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.zahlung__amount {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-variant-numeric: tabular-nums;
}

.zahlung__purpose {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}

/*
  A screen stacks its parts with room between them. Without this every panel is a
  block box whose children sit flush: the Kreditoren tiles touched both the lead
  above and the search bar below, at zero pixels.
*/
[data-panel] {
  display: grid;
  gap: 1.4rem;
  align-content: start;
}

[data-panel][hidden] {
  display: none;
}

/* --- Import history --- */
.history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.history li {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--sunk);
  font-size: 0.86rem;
}

.history li.is-rejected {
  border-color: color-mix(in srgb, var(--neg) 40%, var(--line));
  background: var(--neg-soft);
}

.raw-label {
  margin-bottom: 0.45rem;
}
