body {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: #f8fafc;
}

.container-fluid {
  max-width: 1600px;
}

.card {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
}
.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.btn-outline-secondary {
  color: #334155;
  border-color: #cbd5e1;
}
.btn-outline-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Table toolbar – compact bar directly above the table */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px 6px 0 0;
}

.table-wrap {
  max-height: 650px; /* ~15 rows plus header */
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 0;
}

/* Fix: border-collapse: collapse breaks position: sticky in Safari */
.table-wrap table {
  border-collapse: separate !important;
  border-spacing: 0;
}

/* Sticky column headers within the scroll container */
.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #f8f9fa;
  box-shadow: 0 1px 0 #dee2e6;
}

table.table th,
table.table td {
  vertical-align: top;
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1.3;
  white-space: normal; /* Zeilenumbruch bei langem Text */
  border-right: 1px solid #e5e7eb;
  padding: 0.35rem 0.75rem;
  word-wrap: break-word;
  word-break: break-word;
}

table.table th:last-child,
table.table td:last-child {
  border-right: none;
}

.resize-handle {
  background: transparent;
}

.htmx-indicator {
  display: none;
}

.htmx-indicator.htmx-request {
  display: block;
}

/* Fallback: manuell aktivierter Indikator (ohne htmx) */
.htmx-indicator.manual-request {
  display: block;
}

/* Sticky header removed (not used) */

/* Hover rows */
.table-hover tbody tr:hover {
  background-color: #f5f7fb;
}

/* Badges for business types */
.badge-a54 {
  background: #f8d7da;
  color: #842029;
  font-weight: 600;
}
.badge-a53 {
  background: #e7f1ff;
  color: #0d3c78;
  font-weight: 600;
}

.form-label {
  font-weight: 600;
  color: #1f2937;
}

/* Sort arrows */
.th-sortable {
  cursor: pointer;
}
.th-sortable .arrow {
  font-size: 0.75em;
  color: #c0c5cc;
  margin-left: 4px;
  opacity: 0.9;
  visibility: hidden;
}
.th-sortable.active .arrow {
  color: #0d6efd;
  visibility: visible;
}
.th-sortable:hover .arrow {
  visibility: visible;
}
