/* ═════════════════════════════════════════════════════
   HISTORIAL MEJORADO STYLES
   ═════════════════════════════════════════════════════ */

.historial-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-badge {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 0;
}

/* FILTROS SECTION */
.filtros-section {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filtros-section .section-title {
  margin-top: 0;
}

.filtros-section .form-group input,
.filtros-section .form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--navy-accent);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
}

.filtros-section .form-group input::placeholder {
  color: var(--text-muted);
}

.filtros-section .form-group input:focus,
.filtros-section .form-group select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

/* HISTORIAL CONTENT */
.historial-content {
  margin-top: 1.5rem;
}

.historial-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.historial-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.historial-item:active {
  background: rgba(234, 179, 8, 0.1);
  border-color: var(--border-yellow);
  transform: scale(0.98);
}

.historial-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.historial-placa {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--yellow);
  margin: 0;
}

.historial-estado {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.5rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  white-space: nowrap;
}

.historial-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.historial-dates > div {
  display: flex;
  flex-direction: column;
}

.historial-dates small {
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.historial-dates p {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

.historial-obs {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .historial-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .historial-dates {
    grid-template-columns: repeat(3, 1fr);
  }

  .filtros-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: flex-end;
  }

  .filtros-section .section-title {
    grid-column: 1 / -1;
  }

  .filtros-section .form-group {
    margin: 0;
  }

  .filtros-section .form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
  }

  .filtros-section .btn {
    grid-column: auto;
  }
}

@media (max-width: 767px) {
  .historial-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .historial-dates {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
