body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #f9fafb;
    margin: 0;
    padding: 2rem;
    color: #1f2937;
}

/* Suchleiste */
.search-bar {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 4rem;
    gap: 0.5rem;
}

.search-bar input {
    padding: 0.7rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    font-size: 1rem;
    width: 250px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-bar input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.search-bar button {
    padding: 0.7rem 1.2rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.search-bar button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.search-bar button:active {
    transform: translateY(0);
}

/* Tabelle */
.table {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-collapse: collapse;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.table th, .table td {
    padding: 0.6rem 0.8rem;
    text-align: center;
    font-size: 0.95rem;
}


.table thead {
    background: #2563eb;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.table tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.table tbody tr:hover {
    background: #e0e7ff;
    transition: background 0.2s ease;
}

.table td:first-child {
    font-weight: 600;
    text-align: left;
}

/* Tortendiagramme */
.charts-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.chart-wrapper {
    display: flex;
    flex-direction: row; /* Legende links, Diagramm rechts */
    align-items: center;
    gap: 20px;
}

.legend {
    display: flex;
    flex-wrap: wrap; /* nach 6 Labels neue Reihe? */
    max-width: 120px;
    flex-direction: column;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 3px;
}

.separator {
    width: 2px;
    background-color: #ccc;
    height: 320px;
    align-self: center;
}

h2 {
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 3rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
}

/* Fehlermeldungen */
.flash-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999; /* immer oben */
}

.flash-message {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  animation: fadein 0.5s, fadeout 0.5s 4.5s;
}

/* Farben für Benachrichtigungen nach Kategorie */
.flash-message.success {
  background-color: #28a745;
}

.flash-message.error {
  background-color: #dc3545;
}

.flash-message.warning {
  background-color: #ffc107;
  color: #000;
}

.flash-message.info {
  background-color: #17a2b8;
}

/* Ein-/Ausblendanimation für Meldungen */
@keyframes fadein {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeout {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(20px); }
}

/* Auslastungsgraph */
.util-wrapper {
  max-width: 900px;
  margin: 24px auto;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.util-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.util-canvas-box {
  position: relative;
  height: 320px;
}

.util-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #374151;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  background: #ccc;
}

.legend-swatch.loans { background: #3CA0E8; }
.legend-swatch.holds { background: #FF6384; }