@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600;800&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --bg: #f3efe7;
  --ink: #1c2321;
  --muted: #4d5a56;
  --card: rgba(255, 255, 255, 0.78);
  --line: rgba(28, 35, 33, 0.16);
  --primary: #12664f;
  --secondary: #a23e48;
  --danger: #9e2a2b;
  --ghost: #1c2321;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #f8f4ec 0%, #f3efe7 45%, #e4dfd6 100%);
  min-height: 100vh;
}

.app-version {
  position: fixed;
  top: 0.55rem;
  right: 0.65rem;
  z-index: 5;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #3f4a47;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 35, 33, 0.2);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  backdrop-filter: blur(6px);
}

.bg-shape {
  position: fixed;
  z-index: 0;
  filter: blur(1px);
  opacity: 0.6;
  pointer-events: none;
}

.shape-a {
  width: 35vw;
  height: 35vw;
  border-radius: 42% 58% 30% 70%;
  background: linear-gradient(135deg, #e2f3c5, #8acb88);
  top: -12vw;
  right: -9vw;
  animation: floaty 14s ease-in-out infinite;
}

.shape-b {
  width: 26vw;
  height: 26vw;
  border-radius: 61% 39% 66% 34%;
  background: linear-gradient(135deg, #f6cf9f, #dd7e6b);
  bottom: -10vw;
  left: -6vw;
  animation: floaty 11s ease-in-out infinite reverse;
}

.shape-c {
  width: 32vw;
  height: 32vw;
  border-radius: 30% 70% 62% 38%;
  background: linear-gradient(140deg, #b6d6f2, #7ca8d4);
  top: -10vw;
  left: -8vw;
  animation: floaty 12s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2vw, 1vw) rotate(6deg); }
}

.shell {
  position: relative;
  z-index: 1;
  /* Waechst mit dem Bildschirm, damit Tabellen und die Live-Ansicht Platz
     haben - aber nicht ueber 2000 px, sonst laufen die Zeilen zu weit. */
  max-width: 2000px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 2vw, 2.5rem) 4rem;
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.hero {
  padding: 0.3rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  line-height: 1.05;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
}

.lead {
  color: var(--muted);
  max-width: 70ch;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(28, 35, 33, 0.08);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn:disabled:hover {
  transform: none;
  filter: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-ghost { background: var(--ghost); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-mini { background: rgba(18, 102, 79, 0.1); color: var(--primary); }

.status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: pre-wrap;
}

.payroll-hint {
  margin-bottom: 0.45rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.payroll-hint.is-ok {
  color: #0f6a45;
}

.payroll-hint.is-error {
  color: #9e2a2b;
}

.nav-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.actions .nav-links-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.actions .nav-links-row .nav-link {
  margin-top: 0.45rem;
}

.log-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agenda-live-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.agenda-live-visual-wrap {
  background: #11201a;
  border: 1px solid #2a4438;
  border-radius: 12px;
  padding: 0.85rem;
}

.agenda-live-image {
  width: 100%;
  display: block;
  border-radius: 10px;
  border: 1px solid #2f5546;
  min-height: 260px;
  max-height: 64vh;
  object-fit: contain;
  background: #0f1714;
}

.agenda-live-kpis {
  background: #11201a;
  border: 1px solid #2a4438;
  border-radius: 12px;
  padding: 0.85rem;
}

.agenda-kpi {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.agenda-kpi:last-child {
  margin-bottom: 0;
}

.agenda-kpi-label {
  color: #a8c4b5;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'IBM Plex Mono', monospace;
}

.agenda-kpi-value {
  color: #e2f8e7;
  font-size: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  word-break: break-word;
}

.agenda-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.agenda-kpi.compact {
  margin: 0;
  padding: 0.5rem;
  border-radius: 10px;
  background: #163127;
  border: 1px solid #2f5546;
}

.agenda-kpi.compact.ok {
  background: #153425;
  border-color: #2a6643;
}

.agenda-kpi.compact.error {
  background: #3a1f1f;
  border-color: #6a3333;
}

.agenda-live-events-wrap {
  background: #11201a;
  border: 1px solid #2a4438;
  border-radius: 12px;
  padding: 0.85rem;
  min-height: 460px;
  max-height: 78vh;
  overflow: auto;
}

.agenda-events-head {
  color: #a8c4b5;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
  font-family: 'IBM Plex Mono', monospace;
}

.agenda-live-events {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
  color: #d7f6dc;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.35;
}

.agenda-live-events li {
  word-break: break-word;
}

.agenda-live-events .agenda-empty {
  color: #94b3a3;
}

.agenda-pending-wrap {
  margin-top: 0.9rem;
  background: #11201a;
  border: 1px solid #2a4438;
  border-radius: 12px;
  padding: 0.85rem;
}

.agenda-pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.agenda-pending-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #163127;
  border: 1px solid #2f5546;
  color: #d7f6dc;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
}

.agenda-pending-time {
  color: #9eb7aa;
  white-space: nowrap;
}

.agenda-pending-name {
  min-width: 0;
  word-break: break-word;
}

.agenda-pending-state {
  color: #a8c4b5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.agenda-pending-item a {
  color: inherit;
}

.agenda-fallback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.agenda-fallback-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 102, 79, 0.06);
  padding: 0.7rem;
  min-height: 220px;
}

.agenda-folder-list,
.agenda-folder-children {
  display: grid;
  gap: 0.5rem;
}

.agenda-folder-children-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.agenda-folder-entry {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.agenda-folder-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.agenda-folder-path {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.agenda-children-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.agenda-children-list li {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.3rem;
}


@media (max-width: 780px) {
  .agenda-pending-item {
    grid-template-columns: 1fr;
  }

  .agenda-fallback-grid {
    grid-template-columns: 1fr;
  }
}

.log-output {
  margin: 0;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  background: #121716;
  color: #dff3dd;
  border-radius: 12px;
  border: 1px solid #28312f;
  padding: 0.9rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  max-width: 100%;
}

/* Scrollbare Tabelle mit mitlaufendem Kopf, damit ein kompletter Tag sichtbar bleibt. */
.table-wrap.table-scroll {
  max-height: 460px;
  overflow-y: auto;
}

.table-wrap.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f4ee;
  box-shadow: inset 0 -1px 0 var(--line);
}

.table-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.log-actions .btn-mini {
  text-decoration: none;
  line-height: 1.2;
}

.log-history-wrap {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.log-history-title {
  margin: 0;
  font-size: 1rem;
}

.log-history-limit {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.log-history {
  max-height: 340px;
}

.log-history-meta {
  margin-top: 0.4rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.doc-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.path-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  color: var(--muted);
}

.edit-row td {
  background: rgba(18, 102, 79, 0.04);
  padding: 0.6rem 0.8rem;
}

.inline-edit-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inline-edit-form .rename-input {
  width: 100%;
  font-family: monospace;
  font-size: .85rem;
}

.rename-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.rename-msg {
  font-size: .8rem;
  min-height: 1.1em;
}

.rename-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.company-row {
  align-items: end;
}

.company-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
  box-sizing: border-box;
  cursor: pointer;
  appearance: auto;
}

.active-company-display {
  display: flex;
  align-items: center;
  align-self: end;
  padding: 0.7rem;
  background: rgba(18, 102, 79, 0.08);
  border: 1px solid var(--primary);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  box-sizing: border-box;
}

#activeCompanyText {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
}

.form-actions {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .shell {
    padding: 1rem 0.7rem 2rem;
  }

  .card {
    padding: 0.85rem;
  }

  .log-output {
    min-height: 180px;
  }

  .agenda-live-events-wrap {
    min-height: 320px;
    max-height: 62vh;
  }

  .agenda-live-image {
    min-height: 220px;
    max-height: 48vh;
  }

  .agenda-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* ── Freigabe-Lightbox vor dem Agenda-Upload ─────────────────────────────── */

body.modal-open {
  overflow: hidden;
}

.approval-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(18, 24, 22, 0.55);
  backdrop-filter: blur(3px);
}

.approval-overlay[hidden] {
  display: none;
}

.approval-box {
  display: flex;
  flex-direction: column;
  width: min(1600px, 100%);
  max-height: min(88vh, 900px);
  background: #fbf9f4;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(18, 24, 22, 0.35);
  padding: 1.1rem 1.2rem;
}

.approval-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.approval-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.approval-summary {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

.approval-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.8rem 0 0.5rem;
}

.legend-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.legend-incoming { background: #fbe4ec; }
.legend-outgoing { background: #e2f4e6; }
.legend-none     { background: #ececea; }

.approval-table-wrap {
  flex: 1;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.approval-table {
  width: 100%;
  border-collapse: collapse;
}

.approval-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2efe8;
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-align: left;
  padding: 0.5rem 0.7rem;
}

.approval-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.approval-table .col-doc { width: 48%; }
.approval-table .col-mail { width: 52%; }

/* Farbcodierung nach Belegrichtung */
.approval-row.approval-incoming { background: #fbe4ec; }
.approval-row.approval-outgoing { background: #e2f4e6; }
.approval-row.approval-none     { background: #ececea; }

/* Grau gewinnt: kein Beleg = nichts geht hoch, egal welche Richtung erkannt wurde. */
.approval-row.approval-nodoc    { background: #ececea; }

.doc-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.doc-name.doc-missing {
  font-weight: 600;
  font-style: italic;
  color: #7a3b3b;
}

.doc-meta {
  margin-top: 0.15rem;
  font-size: 0.73rem;
  color: var(--muted);
}

.doc-badge {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(28, 35, 33, 0.25);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.mail-subject {
  font-weight: 600;
  font-size: 0.88rem;
}

.mail-meta {
  margin-top: 0.15rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.mail-note {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #7a3b3b;
}

.method-reason {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--muted);
  font-style: italic;
  max-width: 22rem;
}

.method-reason-unsure {
  color: #8a5f18;
  font-style: normal;
}

.mail-why {
  margin-top: 0.25rem;
  font-size: 0.73rem;
  color: var(--muted);
  font-style: italic;
}

.doc-badge-warn {
  margin-left: 0.3rem;
  border-color: #b4802a;
  color: #8a5f18;
  background: #fdf3e0;
}

.approval-empty {
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

@media (max-width: 720px) {
  .approval-box {
    max-height: 94vh;
    padding: 0.9rem;
  }

  .approval-table .col-doc,
  .approval-table .col-mail {
    width: auto;
  }
}

/* ── Ladebalken ──────────────────────────────────────────────────────────── */

.load-progress {
  margin: 0.6rem 0 0.8rem;
}

.load-progress[hidden] {
  display: none;
}

.load-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(28, 35, 33, 0.1);
  overflow: hidden;
}

.load-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* Solange die Gesamtzahl noch unbekannt ist: laufender Streifen. */
.load-progress-bar.is-indeterminate {
  width: 35%;
  animation: load-progress-slide 1.4s ease-in-out infinite;
}

@keyframes load-progress-slide {
  0%   { margin-left: -35%; }
  100% { margin-left: 100%; }
}

.load-progress-text {
  margin-top: 0.35rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.load-progress-detail {
  margin-top: 0.15rem;
  font-size: 0.73rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .load-progress-bar.is-indeterminate { animation: none; margin-left: 0; width: 100%; opacity: 0.4; }
  .load-progress-bar { transition: none; }
}

.split-hint {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  line-height: 1.2;
  color: #8a5f18;
}

/* ── Breite Bildschirme ──────────────────────────────────────────────────── */
/* Ab hier steht genug Platz zur Verfuegung, um die Live-Ansicht neben die
   Kennzahlen und Ereignisse zu legen, statt alles untereinander zu stapeln. */
@media (min-width: 1400px) {
  .agenda-live-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
    grid-template-areas:
      "visual kpis"
      "visual events";
    align-items: start;
  }

  .agenda-live-visual-wrap { grid-area: visual; }
  .agenda-live-kpis        { grid-area: kpis; }
  .agenda-live-events-wrap { grid-area: events; }

  /* Log und Ausfuehrungsliste duerfen mehr zeigen, wenn Platz da ist. */
  .log-output {
    max-height: 520px;
  }

  .table-wrap.table-scroll {
    max-height: 560px;
  }
}

.mailbox-hint {
  margin-top: 0.15rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Freigabe: Beleg oeffnen und neue Lieferanten anbieten */
.approval-table .doc-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.approval-table .doc-link:hover { text-decoration-thickness: 2px; }

.supplier-offer {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin-top: .4rem;
  font-size: .78rem;
  line-height: 1.3;
  cursor: pointer;
}
.supplier-offer input { margin-top: .15rem; flex: none; }

/* Korrektur von Scanbelegen in der Freigabe-Vorschau */
.scan-korrektur {
  margin-top: .45rem;
  padding: .45rem .55rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .78rem;
}
.scan-korrektur summary { cursor: pointer; color: var(--muted); }
.scan-korrektur-titel { margin-bottom: .35rem; color: var(--muted); }
.scan-korrektur-felder {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .6rem;
  margin-top: .3rem;
}
.scan-korrektur-feld { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 9rem; }
.scan-korrektur-feld input { font: inherit; padding: .2rem .35rem; }
.scan-korrektur-knoepfe {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .4rem;
}
.scan-korrektur-meldung { color: #7a3b3b; }
.scan-korrektur-meldung.scan-korrektur-ok { color: #2f6b45; }
.scan-korrektur-anlagen { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .3rem; }
.anlage-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.approval-head-knoepfe { display: flex; gap: .4rem; align-items: flex-start; flex: none; }

/* Einzelne Belege vom Upload ausschliessen (src/beleg_ausschluss.py) */
.beleg-ausschluss {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .3rem;
  font-size: .76rem;
}
.beleg-ausschluss-status { color: #7a3b3b; font-weight: 600; }
.doc-name.doc-ausgeschlossen,
.doc-name.doc-ausgeschlossen a { text-decoration: line-through; color: var(--muted); }

/* Hinweis, wenn die Seite noch die Fassung vor einem Neustart zeigt */
.reload-notice {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fdf3d8;
  color: #4a3a10;
  box-shadow: 0 12px 28px rgba(18, 24, 22, 0.25);
  font-size: .85rem;
}

.reload-notice[hidden] { display: none; }
