/* ===== BESTANDSINFORMATIONEN STYLES ===== */

.bestand-info-block {
  background: #1a1a1a;
  border-left: 5px solid #64b5f6;
  margin: 20px 0;
  border-radius: 4px;
}

.bestand-info-block .section-title {
  color: #64b5f6;
  text-align: center;
  padding: 10px 0;
}

/* Edit Button Container */
.bestand-edit-btn-container {
  text-align: center;
  padding: 10px;
}

.bestand-edit-btn {
  background: #64b5f6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.bestand-edit-btn:hover {
  background: #5ba3e0;
}

/* Edit Form */
#bestand-edit-form {
  display: none;
  padding: 15px;
  background: #252525;
  border-radius: 4px;
  margin: 10px;
}

.bestand-edit-form-inner {
  max-width: 600px;
  margin: 0 auto;
}

.bestand-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.bestand-form-field label {
  color: #aaa;
  display: block;
  margin-bottom: 5px;
}

.bestand-form-field input,
.bestand-form-field select,
.bestand-form-field textarea {
  width: 100%;
  padding: 10px;
  background: #2d2d2d;
  border: 2px solid #555;
  border-radius: 4px;
  color: #e0e0e0;
  box-sizing: border-box;
  font-size: 14px;
}

.bestand-form-field input:focus,
.bestand-form-field select:focus,
.bestand-form-field textarea:focus {
  outline: none;
  border-color: #64b5f6;
  background: #363636;
}

.bestand-form-field textarea {
  resize: vertical;
}

.bestand-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><polygon fill="%23e0e0e0" points="0,0 12,0 6,12"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.bestand-form-actions {
  text-align: center;
  gap: 10px;
  display: flex;
  justify-content: center;
}

.bestand-form-actions .ke-btn {
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

.bestand-form-actions .ke-btn-success {
  background: #4caf50;
  color: white;
}

.bestand-form-actions .ke-btn-success:hover {
  background: #45a049;
}

.bestand-form-actions .ke-btn-secondary {
  background: #666;
  color: white;
}

.bestand-form-actions .ke-btn-secondary:hover {
  background: #555;
}

/* Bestand Grid */
.bestand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 15px;
  background: #252525;
  border-radius: 4px;
}

.bestand-summary h4,
.bestand-limits h4 {
  margin-top: 0;
  color: #64b5f6;
  text-align: center;
}

.bestand-summary > div,
.bestand-limits > div {
  margin: 10px 0;
  text-align: center;
}

.bestand-summary strong,
.bestand-limits strong {
  color: #aaa;
}

.bestand-value-current {
  font-size: 1.3em;
  color: #64b5f6;
  font-weight: bold;
}

.bestand-box-reserved {
  margin: 10px 0;
  padding: 8px;
  background: #332200;
  border-radius: 3px;
  text-align: center;
}

.bestand-box-reserved strong,
.bestand-box-reserved span {
  color: #ffb74d;
}

.bestand-box-available {
  margin: 10px 0;
  padding: 8px;
  background: #0d3d0d;
  border-radius: 3px;
  text-align: center;
}

.bestand-box-available strong {
  color: #81c784;
}

.bestand-value-available {
  font-size: 1.2em;
  color: #81c784;
  font-weight: bold;
}

.bestand-empty {
  color: #666;
  padding: 10px;
  background: #333;
  border-radius: 3px;
  text-align: center;
}

.bestand-limits-value {
  color: white;
}

.bestand-limits-empty {
  color: #666;
  text-align: center;
}

/* Transaction History */
.bestand-history {
  margin-top: 15px;
  padding: 15px;
  background: #252525;
  border-radius: 4px;
}

.bestand-history h4 {
  color: #64b5f6;
  text-align: center;
}

.bestand-history table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.bestand-history thead tr {
  background: #333;
  border-bottom: 2px solid #64b5f6;
}

.bestand-history th {
  padding: 8px;
  text-align: center;
  color: #64b5f6;
}

.bestand-history tbody tr {
  border-bottom: 1px solid #444;
}

.bestand-history td {
  padding: 8px;
  text-align: center;
}

.bestand-history-date {
  color: #aaa;
}

.bestand-history-type {
  padding: 3px 8px;
  background: #444;
  border-radius: 3px;
  font-size: 0.85em;
  color: #aaa;
}

.bestand-history-change-positive {
  font-weight: bold;
  color: #81c784;
}

.bestand-history-change-negative {
  font-weight: bold;
  color: #ef5350;
}

.bestand-history-balance {
  color: white;
}

.bestand-history-info {
  color: #64b5f6;
  text-align: left;
  font-size: 0.9em;
}
.bestand-history-latest {
  margin-bottom: 20px;
}

.bestand-history-latest h5 {
  color: #64b5f6;
  margin: 0 0 10px 0;
  font-size: 0.95em;
}

.bestand-history-expandable {
  margin-bottom: 20px;
}

.bestand-history-expandable h5 {
  color: #64b5f6;
  margin: 0 0 10px 0;
  font-size: 0.95em;
}

.bestand-history-actions {
  text-align: center;
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #444;
}

.bestand-history-actions .ke-btn {
  font-size: 0.9em;
}