/* Import shared styles */
@import url('dashboard.css?v=20260216mobilefix1');

/* ================================
   Historie Specific Styles
   ================================ */

.subtitle {
  color: var(--text-muted);
  margin-top: 5px;
  font-size: 1rem;
}

/* Filters Section */
.filters {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

/* Filter Input - Dark Mode kompatibel */
.filter-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  min-width: 200px;
}

.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.1);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

/* Filter Select - Dark Mode kompatibel */
.filter-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 150px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.1);
}

.filter-select option {
  background: var(--bg-primary);
  color: var(--text-secondary);
}

/* History Table Enhancements */
.history-table {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow);
  margin: 0 auto;
  max-width: 1400px;
}

/* Table wrapper styles now handled by .mtx-table-wrapper in style.css */

/* Scrollbar Styling - unauffällig */
.table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Table styles now handled by .mtx-table in style.css */

table.table.table-compact thead th,
table.table.table-compact tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Einheitliche Abstände - angleichen an Portfolio */
table.table tbody td {
  vertical-align: middle;
}

table.table tbody td small {
  display: block;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Alternierende Reihen für bessere Lesbarkeit */
table.table.table-striped tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
}

/* Hover-Effekt dezent */
table.table tbody tr:hover {
  background: rgba(0, 200, 150, 0.06);
}

/* Spalten-Ausrichtung - now handled by .mtx-table (all center-aligned) */

/* Badges für Richtung (BUY/SELL) optisch an Dashboard angepasst) */
.dir-buy {
  color: var(--success);
  font-weight: 700;
}

.dir-sell {
  color: var(--danger);
  font-weight: 700;
}

/* Badge styles - ausbalanciert */
.badge-success {
  background: var(--success);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  min-width: 70px;
  text-align: center;
  line-height: 1.2;
}

.badge-danger {
  background: var(--danger);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  min-width: 70px;
  text-align: center;
  line-height: 1.2;
}

/* Layout-Stabilität - kein Springen beim Filtern */
.history-table {
  min-height: 400px;
}

table.table tbody tr {
  transition: background-color 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-group {
    width: 100%;
    flex-direction: column;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: unset;
  }

  .filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  .btn {
    flex: 1;
  }

  .history-table {
    padding: 16px;
  }

  /* Mobile table adjustments now handled by .mtx-table in style.css */
}

@media (min-width: 1366px) and (max-width: 1920px) {
  .history-table {
    max-width: 1200px;
  }
}

@media (min-width: 1920px) {
  .history-table {
    max-width: 1600px;
  }
}
