/* --- Step 4 of the DATEV month-end close (#634) --- */

/* Rows, Soll and Haben of what the table is narrowed to. Wraps on a phone
   rather than pushing the second figure off the edge. */
.dvs-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  min-width: 0;
}

.dvs-totals__count {
  font-weight: 600;
}

.dvs-totals__label {
  margin-left: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* The EXTF header is one line of thirty semicolons; it scrolls inside its own
   box so the page never does. */
.dvs-header-line {
  max-width: 100%;
  overflow-x: auto;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.dvs-header-line code {
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: pre;
}

/* The file card's head: what it is on the left, where its one confirmation
   stands on the right, wrapping under it on a phone. */
.dvs-file__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.dvs-file__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.dvs-file__label,
.dvs-file__who {
  color: var(--text-dim);
}

.dvs-file__name {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

/* One quiet tile per Belegart, sunk into the card rather than raised off it. */
.dvs-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr));
  gap: 0.6rem;
}

.dvs-tile {
  padding: 0.7rem 0.85rem;
  background: var(--sunk);
  min-width: 0;
}

.dvs-tile__value {
  font-size: 1.15rem;
  font-weight: 450;
}

.dvs-tile--outside .tile__name {
  color: var(--neg);
}

.dvs-header summary {
  width: fit-content;
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
}

.dvs-header[open] summary {
  margin-bottom: 0.5rem;
}

.dvs-lines {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

/* The source note names a tenant, a flat and a building. Kept on one line it
   widened the table past its panel at 1440 px; it wraps inside the Quelle column. */
#datev-abschluss-view .cell-note {
  white-space: normal;
}

/* A bank's purpose line runs words together — `140300671010GRUNDBESITZABGABEN
   LOTTER` arrives as one — and one such word widened the table past its panel.
   The prose columns break inside a word only where nothing else fits, and keep
   a reading width on a phone, where the table scrolls instead. */
.dvs-prose {
  min-width: 11rem;
  overflow-wrap: anywhere;
}
