body {
  margin: 0;
  padding: 0;
  position: relative;
  background-color: #f9fafb !important;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  /* >>> NEU: Sidebar bleibt beim Scrollen fix, nur der Inhalt rechts scrollt */
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: flex-start;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  border-radius: 0.57rem;
}

.sidebar-link:hover {
  background-color: #EFF7F4;
  color: #074437;
}

.sidebar-link-disabled {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #c1c8d4;
  border-radius: 0.57rem;
  cursor: not-allowed;
  user-select: none;
}

.sidebar-link.active {
  background-color: #EFF7F4;
  color: #074437;
  font-weight: 600;
}

/* Primärfarbe — zentral hier ändern, gilt für alle btn-primary im Projekt */
.btn-primary {
  background-color: #074437 !important;
  border-color: #074437 !important;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus-visible {
  background-color: #074437 !important;
  border-color: #074437 !important;
  color: #fff;
}

/* Avatar-Kreise mit Initialen */
.avatar-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.avatar-primary { background-color: #074437; }
.avatar-0 { background-color: #4f46e5; }
.avatar-1 { background-color: #0891b2; }
.avatar-2 { background-color: #059669; }
.avatar-3 { background-color: #d97706; }
.avatar-4 { background-color: #dc2626; }
.avatar-5 { background-color: #7c3aed; }
.avatar-6 { background-color: #0d9488; }

/* Rollen-Badges */
.role-badge {
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.role-badge-manager    { background: #d1fae5; color: #065f46; }
.role-badge-employee   { background: #dbeafe; color: #1e40af; }
.role-badge-accountant { background: #ede9fe; color: #5b21b6; }

/* Status-Punkt */
.status-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.375rem;
}
.status-dot-active   { background-color: #10b981; }
.status-dot-inactive { background-color: #9ca3af; }
.status-dot-pending  { background-color: #f59e0b; }

/* Aktionsmenü */
.actions-btn {
  background: none;
  border: none;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.actions-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.actions-menu-dropdown {
  min-width: 10rem;
  top: 100%;
  z-index: 200;
}

.actions-menu-dropdown .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
}

.actions-menu-dropdown .dropdown-item:hover {
  background-color: #f9fafb;
  color: #111827;
}

/* Tabelle: Zellen-Klassen */
.member-name   { font-size: 0.875rem; font-weight: 500; }
.member-sub    { font-size: 0.75rem;  color: #6b7280; }
.member-email  { font-size: 0.875rem; }
.member-status { font-size: 0.875rem; }
.member-login  { font-size: 0.875rem; color: #6b7280; }

/* Tabelle: Filter-Dropdown */
.table-filter-wrapper {
  min-width: 10rem;
}

.table-filter-wrapper .react-select__control {
  min-height: 2rem;
  font-size: 0.875rem;
}

.table-filter-wrapper .react-select__dropdown-indicator {
  padding: 0 0.375rem;
}

.table-filter-wrapper .react-select__value-container {
  padding: 0 0.5rem;
}

/* React Select — Projektfarben statt Blau */
.react-select__control--is-focused {
  border-color: #074437 !important;
  box-shadow: 0 0 0 1px #074437 !important;
}

.react-select__option--is-focused {
  background-color: #EFF7F4 !important;
  color: #074437 !important;
}

.react-select__option--is-selected {
  background-color: #074437 !important;
  color: #fff !important;
}

/* Tabelle: Suchfeld */
.table-search-wrapper {
  position: relative;
  width: 220px;
}

.table-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.9375rem;
  height: 0.9375rem;
  color: #9ca3af;
  pointer-events: none;
}

.table-search-input {
  padding-left: 2rem !important;
}

/* X-Button zum Zurücksetzen der Suche */
.table-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;   
  padding: 0;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
}

.table-search-clear:hover {
  color: #6b7280;
}

.table-filter-wrapper .react-select__control {
  min-height: 2rem;
  font-size: 0.875rem; 
}

/* >>> NEU: Wert/Platzhalter gleiche Schriftgröße wie das Suchfeld (0.875rem) */
.table-filter-wrapper .react-select__single-value,
.table-filter-wrapper .react-select__placeholder {
  font-size: 0.875rem; 
}

/* >>> NEU: Lösch-X in derselben grauen Farbe wie in der Freitextsuche */
.table-filter-wrapper .react-select__clear-indicator {
  color: #9ca3af;
}

.table-filter-wrapper .react-select__clear-indicator:hover {
  color: #6b7280;
}

/* Tabelle: Spaltenköpfe */
.table-header-cell {
  font-weight: 400;
  font-size: 0.8125rem;
  color: #6b7280;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-top: none !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Beleg-Upload: Dropzone im Hochladen-Modal */
.dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 0.75rem;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background-color: #fff;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #074437;
  background-color: #EFF7F4;
}

.dropzone-icon {
  color: #074437;
}

/* Beleg-Upload: eine Zeile in der Liste der gewählten Dateien */
.upload-file-row {
  font-size: 0.875rem;
  padding: 0.375rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 0.375rem;
}

/* Klickbare Tabellenzeile (z. B. Beleg-Detail öffnen) */
.table-row-clickable {
  cursor: pointer;
}

/* Beleg-Detail: Vorschau der Original-Datei rechts im Modal */
.receipt-preview {
  width: 100%;
  height: 70vh;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.receipt-preview-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}


.form-control:focus {
  border-color: #074437 !important;
  box-shadow: 0 0 0 1px  #074437 !important;
}

/* Breiteres Modal für die Paar-Ansicht (Rechnung + Lieferschein nebeneinander) */
.modal-xxl {
  max-width: 95vw !important;
}


/* >>> NEU: Export-Modal — Excel-artige Liste, kompakt und scrollbar (bis ~400 Belege) */
.export-table-wrap {
  max-height: 65vh;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.export-table {
  font-size: 0.8125rem;
}

.export-table thead th {
  position: sticky;
  top: 0;
  background-color: #f3f4f6;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
  z-index: 1;
}

.export-table th,
.export-table td {
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
}

/* Zahlenspalten rechtsbündig, gleiche Ziffernbreite */
.export-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}


/* >>> NEU: Export-Modal — Werkzeugleiste (Spalten ein-/ausblenden) */
.export-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.export-col-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #374151;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

/* >>> NEU: Export-Modal — Spalte mit der Zeilen-Auswahl (Häkchen) */
.export-check-col {
  width: 2.25rem;
  text-align: center;
}

/* >>> NEU: Export-Modal — Eingabefeld in der Zelle (randlos, füllt die Zelle) */
.export-cell-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.8125rem;
  padding: 0.15rem 0.3rem;
  border-radius: 0.25rem;
}

.export-cell-input:focus {
  outline: none;
  border-color: #074437;
  background: #fff;
}

.export-cell-input:disabled {
  color: #9ca3af;
}

/* >>> NEU: Export-Modal — abgewählte Zeile (kommt nicht in den Export) */
.export-row-excluded {
  opacity: 0.5;
}

/* >>> NEU: Export-Modal — Suchfeld in der Liste */
.export-search {
  width: 220px;
}

/* >>> NEU: Export-Modal — Download-Dropdown (Excel / CSV) */
.export-download {
  position: relative;
}

.export-download-menu {
  display: block;
  right: 0;
  left: auto;
}

/* Abschluss-Liste unter der Belegtabelle — Status-Badge + Lade-Datum */
.period-badge {
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.period-badge-done {
  background: #d1fae5;
  color: #065f46;
}
.period-badge-progress {
  background: #f3f4f6;
  color: #6b7280;
}
.belegtabelle h5 {
  font-size: 1.2rem;
}
