body[data-bs-eur] [hidden] {
  display: none !important;
}

body[data-bs-eur] .section {
  min-width: 0;
}

#eurArbeitsbereich,
#eurErfassung {
  scroll-margin-top: 110px;
}

.eur-panel {
  background: var(--white, #ffffff);
  border: 1px solid var(--line, #dce5e9);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 36px);
  margin: 24px 0;
  box-shadow: 0 8px 30px rgba(16, 43, 59, .04);
}

.eur-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.eur-wide {
  grid-column: 1 / -1;
}

.eur-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.eur-field label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy, #102b3b);
}

.eur-field input,
.eur-field select,
.eur-field textarea,
.eur-field output {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line, #dce5e9);
  border-radius: 8px;
  background: var(--white, #ffffff);
  color: var(--ink, #20313d);
  font: inherit;
}

.eur-field textarea {
  resize: vertical;
}

.eur-field input:focus,
.eur-field select:focus,
.eur-field textarea:focus {
  outline: 2px solid var(--teal, #39a69a);
  outline-offset: 2px;
}

.eur-field input[readonly],
.eur-field output {
  background: var(--soft, #f3f7f8);
}

.eur-field output {
  display: flex;
  align-items: center;
  font-weight: 700;
}

.eur-field small {
  color: var(--muted, #647580);
  font-size: .82rem;
  line-height: 1.6;
}

.eur-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.eur-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 125px;
  padding: 24px;
  border: 1px solid var(--line, #dce5e9);
  border-radius: 14px;
  background: var(--white, #ffffff);
  border-top: 4px solid var(--blue, #287ca4);
}

.eur-stat span {
  color: var(--muted, #647580);
  font-size: .9rem;
}

.eur-stat strong {
  color: var(--navy, #102b3b);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.eur-stat-result {
  background: var(--navy, #102b3b);
  border-color: var(--navy, #102b3b);
  border-top-color: var(--teal, #39a69a);
}

.eur-stat-result span {
  color: #dce5e9;
}

.eur-stat-result strong {
  color: #ffffff;
}

body[data-bs-eur] .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0;
}

.eur-journal {
  min-width: 1200px;
}

.eur-journal td {
  vertical-align: middle;
}

.eur-journal td:nth-child(4),
.eur-journal td:nth-child(5),
.eur-journal td:nth-child(6),
.eur-journal td:nth-child(7) {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.eur-journal td:nth-child(3) {
  min-width: 220px;
  overflow-wrap: anywhere;
}

.eur-row-open td {
  background: #fff8eb;
}

.eur-total td {
  background: var(--soft, #f3f7f8);
  color: var(--navy, #102b3b);
  font-weight: 700;
}

.eur-action {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 8px 12px;
  border: 1px solid var(--line, #dce5e9);
  border-radius: 6px;
  background: #ffffff;
  color: var(--blue, #287ca4);
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
}

.eur-action:hover {
  background: var(--soft, #f3f7f8);
}

.eur-action-delete {
  color: #a63d3d;
}

.eur-filter {
  padding: 20px;
  border-radius: 12px;
  background: var(--soft, #f3f7f8);
}

.eur-status {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--soft, #f3f7f8);
  border-left: 4px solid var(--blue, #287ca4);
  border-radius: 6px;
  font-size: .9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.eur-status:empty {
  display: none;
}

.eur-status-success {
  border-left-color: #267c71;
  color: #205e56;
}

.eur-status-warning {
  background: #fff8eb;
  border-left-color: #bc8733;
  color: #79561f;
}

.eur-status-error {
  background: #fff0f0;
  border-left-color: #b94a48;
  color: #8e2929;
}

.eur-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  line-height: 1.6;
  border-bottom: 1px solid var(--line, #dce5e9);
  cursor: pointer;
}

.eur-check:last-of-type {
  border-bottom: 0;
}

.eur-check input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--teal-dark, #267c71);
}

.eur-check span {
  flex: 1;
}

.eur-danger {
  background: #a63d3d;
  border-color: #a63d3d;
  color: #ffffff;
}

.eur-danger:hover {
  background: #843030;
}

#bsEurDruckbereich {
  display: none;
}

@media (max-width: 1000px) {

  .eur-form-grid,
  .eur-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 650px) {

  .eur-form-grid,
  .eur-dashboard {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .eur-panel {
    padding: 18px;
  }

  .eur-stat {
    min-height: 95px;
    padding: 18px;
  }

  body[data-bs-eur] .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-bs-eur] .button-row .button {
    width: 100%;
    text-align: center;
  }

}

@media print {

  body[data-bs-eur] {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body[data-bs-eur] > * {
    display: none !important;
  }

  body[data-bs-eur] > #bsEurDruckbereich {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 10pt;
  }

  #bsEurDruckbereich h1 {
    font-size: 18pt;
    color: #000000;
  }

  #bsEurDruckbereich h2 {
    font-size: 13pt;
    margin-top: 22px;
    color: #000000;
    break-after: avoid;
  }

  #bsEurDruckbereich h3 {
    font-size: 11pt;
    color: #000000;
  }

  #bsEurDruckbereich table {
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse;
    font-size: 8.5pt;
  }

  #bsEurDruckbereich th,
  #bsEurDruckbereich td {
    border: 1px solid #cccccc;
    padding: 6px;
    background: #ffffff;
    color: #000000;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  #bsEurDruckbereich thead {
    display: table-header-group;
  }

  #bsEurDruckbereich tr {
    break-inside: avoid;
  }

}